8000 MNT Mark test_openml as XFAIL for PyPy (#18907) · franslarsson/scikit-learn@8caff3c · GitHub
[go: up one dir, main page]

Skip to content

Commit 8caff3c

Browse files
authored
MNT Mark test_openml as XFAIL for PyPy (scikit-learn#18907)
1 parent a8b1905 commit 8caff3c

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

sklearn/datasets/tests/test_openml.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from sklearn.datasets.tests.test_common import check_return_X_y
2929
from sklearn.externals._arff import ArffContainerType
3030
from functools import partial
31+
from sklearn.utils._testing import fails_if_pypy
3132

3233

3334
currdir = os.path.dirname(os.path.abspath(__file__))
@@ -296,6 +297,9 @@ def test_feature_to_dtype_error(feature):
296297
_feature_to_dtype(feature)
297298

298299

300+
# Known failure of PyPy for OpenML. See the following issue:
301+
# https://github.com/scikit-learn/scikit-learn/issues/18906
302+
@fails_if_pypy
299303
def test_fetch_openml_iris_pandas(monkeypatch):
300304
# classification dataset with numeric only columns
301305
pd = pytest.importorskip('pandas')
@@ -337,6 +341,9 @@ def test_fetch_openml_iris_pandas(monkeypatch):
337341
assert frame.index.is_unique
338342

339343

344+
# Known failure of PyPy for OpenML. See the following issue:
345+
# https://github.com/scikit-learn/scikit-learn/issues/18906
346+
@fails_if_pypy
340347
def test_fetch_openml_iris_pandas_equal_to_no_frame(monkeypatch):
341348
# as_frame = True returns the same underlying data as as_frame = False
342349
pytest.importorskip('pandas')
@@ -356,6 +363,9 @@ def test_fetch_openml_iris_pandas_equal_to_no_frame(monkeypatch):
356363
assert_array_equal(norm_target, frame_target)
357364

358365

366+
# Known failure of PyPy for OpenML. See the following issue:
367+
# https://github.com/scikit-learn/scikit-learn/issues/18906
368+
@fails_if_pypy
359369
def test_fetch_openml_iris_multitarget_pandas(monkeypatch):
360370
# classification dataset with numeric only columns
361371
pd = pytest.importorskip('pandas')
@@ -398,6 +408,9 @@ def test_fetch_openml_iris_multitarget_pandas(monkeypatch):
398408
assert np.all(frame.dtypes == [np.float64] * 4 + [cat_dtype])
399409

400410

411+
# Known failure of PyPy for OpenML. See the following issue:
412+
# https://github.com/scikit-learn/scikit-learn/issues/18906
413+
@fails_if_pypy
401414
def test_fetch_openml_anneal_pandas(monkeypatch):
402415
# classification dataset with numeric and categorical columns
403416
pd = pytest.importorskip('pandas')
@@ -435,6 +448,9 @@ def test_fetch_openml_anneal_pandas(monkeypatch):
435448
assert frame.shape == frame_shape
436449

437450

451+
# Known failure of PyPy for OpenML. See the following issue:
452+
# https://github.com/scikit-learn/scikit-learn/issues/18906
453+
@fails_if_pypy
438454
def test_fetch_openml_cpu_pandas(monkeypatch):
439455
# regression dataset with numeric and categorical columns
440456
pd = pytest.importorskip('pandas')
@@ -489,6 +505,9 @@ def test_fetch_openml_australian_pandas_error_sparse(monkeypatch):
489505
fetch_openml(data_id=data_id, as_frame=True, cache=False)
490506

491507

508+
# Known failure of PyPy for OpenML. See the following issue:
509+
# https://github.com/scikit-learn/scikit-learn/issues/18906
510+
@fails_if_pypy
492511
def test_fetch_openml_as_frame_auto(monkeypatch):
493512
pd = pytest.importorskip('pandas')
494513

@@ -503,6 +522,9 @@ def test_fetch_openml_as_frame_auto(monkeypatch):
503522
assert isinstance(data.data, scipy.sparse.csr_matrix)
504523

505524

525+
# Known failure of PyPy for OpenML. See the following issue:
526+
# https://github.com/scikit-learn/scikit-learn/issues/18906
527+
@fails_if_pypy
506528
def test_convert_arff_data_dataframe_warning_low_memory_pandas(monkeypatch):
507529
pytest.importorskip('pandas')
508530

@@ -515,6 +537,9 @@ def test_convert_arff_data_dataframe_warning_low_memory_pandas(monkeypatch):
515537
fetch_openml(data_id=data_id, as_frame=True, cache=False)
516538

517539

540+
# Known failure of PyPy for OpenML. See the following issue:
541+
# https://github.com/scikit-learn/scikit-learn/issues/18906
542+
@fails_if_pypy
518543
def test_fetch_openml_adultcensus_pandas_return_X_y(monkeypatch):
519544
pd = pytest.importorskip('pandas')
520545
CategoricalDtype = pd.api.types.CategoricalDtype
@@ -543,6 +568,9 @@ def test_fetch_openml_adultcensus_pandas_return_X_y(monkeypatch):
543568
assert y.name == target_column
544569

545570

571+
# Known failure of PyPy for OpenML. See the following issue:
572+
# https://github.com/scikit-learn/scikit-learn/issues/18906
573+
@fails_if_pypy
546574
def test_fetch_openml_adultcensus_pandas(monkeypatch):
547575
pd = pytest.importorskip('pandas')
548576
CategoricalDtype = pd.api.types.CategoricalDtype
@@ -579,6 +607,9 @@ def test_fetch_openml_adultcensus_pandas(monkeypatch):
579607
assert frame.shape == frame_shape
580608

581609

610+
# Known failure of PyPy for OpenML. See the following issue:
611+
# https://github.com/scikit-learn/scikit-learn/issues/18906
612+
@fails_if_pypy
582613
def test_fetch_openml_miceprotein_pandas(monkeypatch):
583614
# JvR: very important check, as this dataset defined several row ids
584615
# and ignore attributes. Note that data_features json has 82 attributes,
@@ -619,6 +650,9 @@ def test_fetch_openml_miceprotein_pandas(monkeypatch):
619650
assert frame_n_floats == n_floats
620651

621652

653+
# Known failure of PyPy for OpenML. See the following issue:
654+
# https://github.com/scikit-learn/scikit-learn/issues/18906
655+
@fails_if_pypy
622656
def test_fetch_openml_emotions_pandas(monkeypatch):
623657
# classification dataset with multiple targets (natively)
624658
pd = pytest.importorskip('pandas')
@@ -657,6 +691,9 @@ def test_fetch_openml_emotions_pandas(monkeypatch):
657691
assert expected_frame_floats == n_floats
658692

659693

694+
# Known failure of PyPy for OpenML. See the following issue:
695+
# https://github.com/scikit-learn/scikit-learn/issues/18906
696+
@fails_if_pypy
660697
def test_fetch_openml_titanic_pandas(monkeypatch):
661698
# dataset with strings
662699
pd = pytest.importorskip('pandas')
@@ -1208,6 +1245,9 @@ def test_fetch_openml_with_ignored_feature(monkeypatch, gzip_response):
12081245
assert 'animal' not in dataset['feature_names']
12091246

12101247

1248+
# Known failure of PyPy for OpenML. See the following issue:
1249+
# https://github.com/scikit-learn/scikit-learn/issues/18906
1250+
@fails_if_pypy
12111251
@pytest.mark.parametrize('as_frame', [True, False])
12121252
def test_fetch_openml_verify_checksum(monkeypatch, as_frame, cache, tmpdir):
12131253
if as_frame:

0 commit comments

Comments
 (0)
0