U
    }±Ëh?  ã                   @   s$   d Z ddlZddlmZ dd„ ZdS )z<Tests for making sure experimental imports work as expected.é    N)Úassert_run_python_scriptc                  C   s:   d} t t | ¡ƒ d}t t |¡ƒ d}t t |¡ƒ d S )Nz½
    from sklearn.experimental import enable_halving_search_cv
    from sklearn.model_selection import HalvingGridSearchCV
    from sklearn.model_selection import HalvingRandomSearchCV
    zà
    import sklearn.model_selection
    from sklearn.experimental import enable_halving_search_cv
    from sklearn.model_selection import HalvingGridSearchCV
    from sklearn.model_selection import HalvingRandomSearchCV
    aa  
    import pytest

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

    import sklearn.experimental
    with pytest.raises(ImportError, match='HalvingRandomSearchCV is experimental'):
        from sklearn.model_selection import HalvingRandomSearchCV
    )r   ÚtextwrapÚdedent)Zgood_importZ&good_import_with_model_selection_firstZbad_imports© r   ú]/tmp/pip-unpacked-wheel-ig1s1lm8/sklearn/experimental/tests/test_enable_successive_halving.pyÚtest_imports_strategies   s    
r   )Ú__doc__r   Zsklearn.utils._testingr   r   r   r   r   r   Ú<module>   s   