
    sgh                     v    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        Z	y)z<Tests for making sure experimental imports work as expected.    N)'assert_run_python_script_without_output)_IS_WASMzcannot start subprocess)reasonc                      d} d}t        t        j                  |      |        d}t        t        j                  |      |        d| d| d}t        t        j                  |      |        y )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   good_import&good_import_with_model_selection_firstbad_importss       l/var/www/html/venv/lib/python3.12/site-packages/sklearn/experimental/tests/test_enable_successive_halving.pytest_imports_strategiesr      s     =GK
 ,$g.* ,>?
+ ,3+ 6+ ,3+ 6	K ,$    )
__doc__r   pytestsklearn.utils._testingr   sklearn.utils.fixesr   markxfailr    r   r   <module>r      s=    B   J ( 8$=>) ?)r   