diff options
author | mattip <matti.picus@gmail.com> | 2021-01-24 08:11:34 +0200 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2021-01-24 08:11:34 +0200 |
commit | 333fd949081b279da31e589d178d3ac609d0597b (patch) | |
tree | 57a9d0a8541fd08553b93d64b9fd48ef00897017 | |
parent | 518edc70744faa0bd1443c9f9ce76a1c01d7749e (diff) | |
download | numpy-333fd949081b279da31e589d178d3ac609d0597b.tar.gz |
fix from review
-rw-r--r-- | numpy/lib/tests/test_io.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index a823b12a2..534ab683c 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -574,13 +574,13 @@ class TestSaveTxt: @pytest.mark.skipif(sys.platform=='win32', reason="files>4GB may not work") @pytest.mark.slow - @requires_memory(free_bytes=8e9) + @requires_memory(free_bytes=7e9) def test_large_zip(self): def check_large_zip(memoryerror_raised): memoryerror_raised.value = False try: # The test takes at least 6GB of memory, writes a file larger - # than 4GB + # than 4GB. This tests the ``allowZip64`` kwarg to ``zipfile`` test_data = np.asarray([np.random.rand( np.random.randint(50,100),4) for i in range(800000)], dtype=object) @@ -599,6 +599,9 @@ class TestSaveTxt: p.join() if memoryerror_raised.value: raise MemoryError("Child process raised a MemoryError exception") + # -9 indicates a SIGKILL, probably an OOM. + if p.exitcode == -9: + pytest.xfail("subprocess got a SIGKILL, apparently free memory was not sufficient") assert p.exitcode == 0 class LoadTxtBase: |