Skip to content

TST add global_random_seed fixture to sklearn/datasets/tests/test_covtype.py #25904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sklearn/datasets/tests/test_covtype.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from sklearn.datasets.tests.test_common import check_return_X_y


def test_fetch(fetch_covtype_fxt):
data1 = fetch_covtype_fxt(shuffle=True, random_state=42)
data2 = fetch_covtype_fxt(shuffle=True, random_state=37)
def test_fetch(fetch_covtype_fxt, global_random_seed):
data1 = fetch_covtype_fxt(shuffle=True, random_state=global_random_seed)
data2 = fetch_covtype_fxt(shuffle=True, random_state=global_random_seed + 1)

X1, X2 = data1["data"], data2["data"]
assert (581012, 54) == X1.shape
Expand Down