diff options
author | Matti Picus <matti.picus@gmail.com> | 2020-04-15 19:55:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 19:55:30 +0300 |
commit | c31ba764540a12843b3caf711b447fe3e08c5a46 (patch) | |
tree | 5e16e5de3641e007650505c93eab09420e61e4d0 /numpy | |
parent | fc1f196584ff6dd530982febba2322679317c632 (diff) | |
parent | 6736d8c53ab80178195da8b5fe61e174cc5ea26e (diff) | |
download | numpy-c31ba764540a12843b3caf711b447fe3e08c5a46.tar.gz |
Merge pull request #15967 from anirudh2290/slow_pypy_impl
TST: Add slow_pypy support
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/_pytesttester.py | 8 | ||||
-rw-r--r-- | numpy/conftest.py | 2 | ||||
-rw-r--r-- | numpy/core/tests/test_regression.py | 1 | ||||
-rw-r--r-- | numpy/lib/tests/test_io.py | 1 |
4 files changed, 11 insertions, 1 deletions
diff --git a/numpy/_pytesttester.py b/numpy/_pytesttester.py index 0dc38fa59..ca86aeb22 100644 --- a/numpy/_pytesttester.py +++ b/numpy/_pytesttester.py @@ -169,7 +169,13 @@ class PytestTester: pytest_args += ["--cov=" + module_path] if label == "fast": - pytest_args += ["-m", "not slow"] + # not importing at the top level to avoid circular import of module + from numpy.testing import IS_PYPY + if IS_PYPY: + pytest_args += ["-m", "not slow and not slow_pypy"] + else: + pytest_args += ["-m", "not slow"] + elif label != "full": pytest_args += ["-m", label] diff --git a/numpy/conftest.py b/numpy/conftest.py index 1d3e0349f..20c8a449e 100644 --- a/numpy/conftest.py +++ b/numpy/conftest.py @@ -27,6 +27,8 @@ def pytest_configure(config): "leaks_references: Tests that are known to leak references.") config.addinivalue_line("markers", "slow: Tests that are very slow.") + config.addinivalue_line("markers", + "slow_pypy: Tests that are very slow on pypy.") def pytest_addoption(parser): diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py index 4d7639e43..fb969e5f8 100644 --- a/numpy/core/tests/test_regression.py +++ b/numpy/core/tests/test_regression.py @@ -2030,6 +2030,7 @@ class TestRegression: a[...] = [[1, 2]] assert_equal(a, [[1, 2], [1, 2]]) + @pytest.mark.slow_pypy def test_memoryleak(self): # Ticket #1917 - ensure that array data doesn't leak for i in range(1000): diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index 8ce20a116..9abde3e11 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -278,6 +278,7 @@ class TestSavezLoad(RoundtripTest): fp.seek(0) assert_(not fp.closed) + @pytest.mark.slow_pypy def test_closing_fid(self): # Test that issue #1517 (too many opened files) remains closed # It might be a "weak" test since failed to get triggered on |