Skip to content

Commit fbfb4da

Browse files
thomasjpfanrth
authored andcommitted
TST/CI Fixes import for hashing test for PyPy (scikit-learn#15170)
1 parent a59562d commit fbfb4da

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

sklearn/feature_extraction/tests/test_feature_hasher.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def test_feature_hasher_strings():
4747

4848
def test_hashing_transform_seed():
4949
# check the influence of the seed when computing the hashes
50+
# import is here to avoid importing on pypy
5051
from sklearn.feature_extraction._hashing import (
5152
transform as _hashing_transform)
5253
raw_X = [["foo", "bar", "baz", "foo".encode("ascii")],

sklearn/utils/testing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ def set_random_state(estimator, random_state=0):
580580
reason='skipped on 32bit platforms')
581581
skip_travis = pytest.mark.skipif(os.environ.get('TRAVIS') == 'true',
582582
reason='skip on travis')
583-
fails_if_pypy = pytest.mark.xfail(IS_PYPY, raises=NotImplementedError,
583+
fails_if_pypy = pytest.mark.xfail(IS_PYPY,
584584
reason='not compatible with PyPy')
585585
skip_if_no_parallel = pytest.mark.skipif(not joblib.parallel.mp,
586586
reason="joblib is in serial mode")

0 commit comments

Comments
 (0)