From e841dddcd8580ef6ed4e06c61eb092ded16926c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Wed, 13 Sep 2023 11:34:08 +0200 Subject: [PATCH 1/2] MNT Remove unneded test_tabs since we use black --- sklearn/tests/test_docstring_parameters.py | 23 ---------------------- 1 file changed, 23 deletions(-) diff --git a/sklearn/tests/test_docstring_parameters.py b/sklearn/tests/test_docstring_parameters.py index 9169f24310856..e6d2ade736f4a 100644 --- a/sklearn/tests/test_docstring_parameters.py +++ b/sklearn/tests/test_docstring_parameters.py @@ -154,29 +154,6 @@ def test_docstring_parameters(): raise AssertionError("Docstring Error:\n" + msg) -@ignore_warnings(category=FutureWarning) -def test_tabs(): - # Test that there are no tabs in our source files - for importer, modname, ispkg in walk_packages(sklearn.__path__, prefix="sklearn."): - if IS_PYPY and ( - "_svmlight_format_io" in modname - or "feature_extraction._hashing_fast" in modname - ): - continue - - # because we don't import - mod = importlib.import_module(modname) - - try: - source = inspect.getsource(mod) - except IOError: # user probably should have run "make clean" - continue - assert "\t" not in source, ( - '"%s" has tabs, please remove them ', - "or add it to the ignore list" % modname, - ) - - def _construct_searchcv_instance(SearchCV): return SearchCV(LogisticRegression(), {"C": [0.1, 1]}) From 2f05e9ccd04f31231acb6e5f2fc47fefcf8b4293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Wed, 13 Sep 2023 11:49:24 +0200 Subject: [PATCH 2/2] Avoid test suite dependency on setuptools --- sklearn/tests/test_common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sklearn/tests/test_common.py b/sklearn/tests/test_common.py index 9ff5bf21c9a7d..a5f485ee1a882 100644 --- a/sklearn/tests/test_common.py +++ b/sklearn/tests/test_common.py @@ -217,6 +217,9 @@ def test_import_all_consistency(): for modname in submods + ["sklearn"]: if ".tests." in modname: continue + # Avoid test suite depending on setuptools + if modname == "sklearn._build_utils.pre_build_helpers": + continue if IS_PYPY and ( "_svmlight_format_io" in modname or "feature_extraction._hashing_fast" in modname