From 518edc70744faa0bd1443c9f9ce76a1c01d7749e Mon Sep 17 00:00:00 2001 From: mattip Date: Fri, 22 Jan 2021 08:45:21 +0200 Subject: TST: raise memory limit for test --- numpy/lib/tests/test_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/tests/test_io.py') diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index aa4499764..a823b12a2 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -574,7 +574,7 @@ class TestSaveTxt: @pytest.mark.skipif(sys.platform=='win32', reason="files>4GB may not work") @pytest.mark.slow - @requires_memory(free_bytes=7e9) + @requires_memory(free_bytes=8e9) def test_large_zip(self): def check_large_zip(memoryerror_raised): memoryerror_raised.value = False -- cgit v1.2.1 From 333fd949081b279da31e589d178d3ac609d0597b Mon Sep 17 00:00:00 2001 From: mattip Date: Sun, 24 Jan 2021 08:11:34 +0200 Subject: fix from review --- numpy/lib/tests/test_io.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'numpy/lib/tests/test_io.py') 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: -- cgit v1.2.1