8000 MNT skip preprocessing.rst when pandas is not installed by glemaitre · Pull Request #19016 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

MNT skip preprocessing.rst when pandas is not installed #19016

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 6 commits into from
Dec 18, 2020
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
11 changes: 9 additions & 2 deletions doc/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
from os.path import join
import warnings

import numpy as np

from sklearn.utils import IS_PYPY
from sklearn.utils._testing import SkipTest
from sklearn.utils._testing import check_skip_network
Expand Down Expand Up @@ -72,6 +70,13 @@ def setup_grid_search():
raise SkipTest("Skipping grid_search.rst, pandas not installed")


def setup_preprocessing():
try:
import pandas # noqa
except ImportError:
raise SkipTest("Skipping preprocessing.rst, pandas not installed")


def setup_unsupervised_learning():
try:
import skimage # noqa
Expand Down Expand Up @@ -105,5 +110,7 @@ def pytest_runtest_setup(item):
setup_impute()
elif fname.endswith('modules/grid_search.rst'):
setup_grid_search()
elif fname.endswith('modules/preprocessing.rst'):
setup_preprocessing()
elif fname.endswith('statistical_inference/unsupervised_learning.rst'):
setup_unsupervised_learning()
0