o
    ih                     @   sH   d Z ddlZddlZddlmZ ddlmZ ejjedddd Z	dS )	z<Tests for making sure experimental imports work as expected.    N)'assert_run_python_script_without_output)_IS_WASMzcannot start subprocess)reasonc                  C   sX   d} d}t t|| d d}t t|| d d| d| d}t t|| d d S )Nz,Halving(Grid|Random)SearchCV is experimentalz
    from sklearn.experimental import enable_halving_search_cv
    from sklearn.model_selection import HalvingGridSearchCV
    from sklearn.model_selection import HalvingRandomSearchCV
    )patternz
    import sklearn.model_selection
    from sklearn.experimental import enable_halving_search_cv
    from sklearn.model_selection import HalvingGridSearchCV
    from sklearn.model_selection import HalvingRandomSearchCV
    z>
    import pytest

    with pytest.raises(ImportError, match=z):
        from sklearn.model_selection import HalvingGridSearchCV

    import sklearn.experimental
    with pytest.raises(ImportError, match=zI):
        from sklearn.model_selection import HalvingRandomSearchCV
    )r   textwrapdedent)r   Zgood_importZ&good_import_with_model_selection_firstZbad_imports r   s/home/kim/smarthome/.venv/lib/python3.10/site-packages/sklearn/experimental/tests/test_enable_successive_halving.pytest_imports_strategies   s&   


r
   )
__doc__r   ZpytestZsklearn.utils._testingr   Zsklearn.utils.fixesr   markZxfailr
   r   r   r   r	   <module>   s    