10000 TST Default skip network tests (#18002) · scikit-learn/scikit-learn@cb8f180 · GitHub
[go: up one dir, main page]

Skip to content

Commit cb8f180

Browse files
authored
TST Default skip network tests (#18002)
1 parent 1b45ff7 commit cb8f180

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sklearn/datasets/tests/test_common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ def check_as_frame(bunch, dataset_func,
7676
assert np.all(frame_bunch.target.dtypes == expected_target_dtype)
7777

7878

79-
def _has_network():
80-
return bool(os.environ.get("SKLEARN_SKIP_NETWORK_TESTS", False))
79+
def _skip_network_tests():
80+
return os.environ.get('SKLEARN_SKIP_NETWORK_TESTS', '1') == '1'
8181

8282

8383
def _generate_func_supporting_param(param, dataset_type=("load", "fetch")):
@@ -91,7 +91,7 @@ def _generate_func_supporting_param(param, dataset_type=("load", "fetch")):
9191
if is_dataset_type and is_support_param:
9292
# check if we should skip if we don't have network support
9393
marks = [pytest.mark.skipif(
94-
condition=name.startswith("fetch") and _has_network(),
94+
condition=name.startswith("fetch") and _skip_network_tests(),
9595
reason="Skip because fetcher requires internet network",
9696
)]
9797
if name in markers_fetch:

0 commit comments

Comments
 (0)
0