Skip to content

MNT move pytest pluging list to root folder #22976

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 8 commits into from
Mar 30, 2022
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
9 changes: 5 additions & 4 deletions sklearn/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
from sklearn.datasets import fetch_kddcup99
from sklearn.datasets import fetch_olivetti_faces
from sklearn.datasets import fetch_rcv1


# This plugin is necessary to define the random seed fixture
pytest_plugins = ("sklearn.tests.random_seed",)
from sklearn.tests import random_seed


if parse_version(pytest.__version__) < parse_version(PYTEST_MIN_VERSION):
Expand Down Expand Up @@ -249,3 +246,7 @@ def pytest_configure(config):
matplotlib.use("agg")
except ImportError:
pass

# Register global_random_seed plugin if it is not already registered
if not config.pluginmanager.hasplugin("sklearn.tests.random_seed"):
config.pluginmanager.register(random_seed)