summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_io.py
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2020-07-28 15:43:38 +0300
committermattip <matti.picus@gmail.com>2020-07-30 00:08:35 +0300
commitcf5e7665fdd764a6647f2b62d2740bb431180794 (patch)
treec3604726e27588507cba43e32c5312eb9260f31e /numpy/lib/tests/test_io.py
parentd28ac9aa5e2158f8418d446b55cff5772392c35f (diff)
downloadnumpy-cf5e7665fdd764a6647f2b62d2740bb431180794.tar.gz
TST: fix tests for windows + PyPy
Diffstat (limited to 'numpy/lib/tests/test_io.py')
-rw-r--r--numpy/lib/tests/test_io.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py
index 959e63fa2..a23c6b007 100644
--- a/numpy/lib/tests/test_io.py
+++ b/numpy/lib/tests/test_io.py
@@ -24,7 +24,8 @@ from numpy.ma.testutils import assert_equal
from numpy.testing import (
assert_warns, assert_, assert_raises_regex, assert_raises,
assert_allclose, assert_array_equal, temppath, tempdir, IS_PYPY,
- HAS_REFCOUNT, suppress_warnings, assert_no_gc_cycles, assert_no_warnings
+ HAS_REFCOUNT, suppress_warnings, assert_no_gc_cycles, assert_no_warnings,
+ break_cycles
)
from numpy.testing._private.utils import requires_memory
@@ -2387,6 +2388,9 @@ class TestPathUsage:
assert_array_equal(data, a)
# close the mem-mapped file
del data
+ if IS_PYPY:
+ break_cycles()
+ break_cycles()
def test_save_load_memmap_readwrite(self):
# Test that pathlib.Path instances can be written mem-mapped.
@@ -2398,6 +2402,9 @@ class TestPathUsage:
a[0][0] = 5
b[0][0] = 5
del b # closes the file
+ if IS_PYPY:
+ break_cycles()
+ break_cycles()
data = np.load(path)
assert_array_equal(data, a)