diff options
author | mattip <matti.picus@gmail.com> | 2016-08-06 23:15:40 +0300 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2016-08-15 19:46:41 +0300 |
commit | 76eff9ca4648e96ba1f560e83f40383f68805493 (patch) | |
tree | fd6fb98bd46416ed561ecbf3c39b9c44cf2bce18 /numpy/lib/tests | |
parent | 0fc9e4520b1d00b58a77f28936da2fec2672de83 (diff) | |
download | numpy-76eff9ca4648e96ba1f560e83f40383f68805493.tar.gz |
ENH: skip or avoid gc/objectmodel differences btwn pypy and cpython
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 4 | ||||
-rw-r--r-- | numpy/lib/tests/test_io.py | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index c2bcc62ba..0d7b11c44 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -10,6 +10,7 @@ from numpy.testing import ( assert_allclose, assert_array_max_ulp, assert_warns, assert_raises_regex, dec, clear_and_catch_warnings ) +from numpy.testing.utils import HAS_REFCOUNT import numpy.lib.function_base as nfb from numpy.random import rand from numpy.lib import ( @@ -17,7 +18,7 @@ from numpy.lib import ( delete, diff, digitize, extract, flipud, gradient, hamming, hanning, histogram, histogramdd, i0, insert, interp, kaiser, meshgrid, msort, piecewise, place, rot90, select, setxor1d, sinc, split, trapz, trim_zeros, - unwrap, unique, vectorize, + unwrap, unique, vectorize ) from numpy.compat import long @@ -2232,6 +2233,7 @@ class TestBincount(TestCase): "minlength must be positive", lambda: np.bincount(x, minlength=0)) + @dec.skipif(not HAS_REFCOUNT, "python has no sys.getrefcount") def test_dtype_reference_leaks(self): # gh-6805 intp_refcount = sys.getrefcount(np.dtype(np.intp)) diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index de73d57f7..1474349de 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -19,7 +19,7 @@ from numpy.ma.testutils import assert_equal from numpy.testing import ( TestCase, run_module_suite, assert_warns, assert_, assert_raises_regex, assert_raises, assert_allclose, - assert_array_equal, temppath, dec + assert_array_equal, temppath, dec, IS_PYPY ) @@ -266,6 +266,7 @@ class TestSavezLoad(RoundtripTest, TestCase): fp.seek(0) assert_(not fp.closed) + @np.testing.dec.skipif(IS_PYPY, "context manager required on 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 |