summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorAnirudh Subramanian <anirudh2290@ufl.edu>2020-04-10 20:32:44 +0000
committerAnirudh Subramanian <anirudh2290@ufl.edu>2020-04-13 18:44:13 +0000
commit9df2c98537b72c74f4e996ad840f1fe5a5f003df (patch)
tree6b952c2c30e6a7825af7bad82c2d4c27085f8217 /numpy
parent42228fcb513c08729f822fa6be70e16a7a68067f (diff)
downloadnumpy-9df2c98537b72c74f4e996ad840f1fe5a5f003df.tar.gz
TST: Add slow_pypy support
Diffstat (limited to 'numpy')
-rw-r--r--numpy/_pytesttester.py5
-rw-r--r--numpy/conftest.py2
-rw-r--r--numpy/core/tests/test_regression.py1
-rw-r--r--numpy/lib/tests/test_io.py1
4 files changed, 8 insertions, 1 deletions
diff --git a/numpy/_pytesttester.py b/numpy/_pytesttester.py
index 0dc38fa59..9e3c95740 100644
--- a/numpy/_pytesttester.py
+++ b/numpy/_pytesttester.py
@@ -169,7 +169,10 @@ 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
+ pytest_args += ["-m", "not slow and not slow_pypy"] \
+ if IS_PYPY else ["-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