diff options
| author | Charles Harris <charlesr.harris@gmail.com> | 2021-01-30 11:03:11 -0700 |
|---|---|---|
| committer | Charles Harris <charlesr.harris@gmail.com> | 2021-01-30 11:03:11 -0700 |
| commit | 6c3cabd8227dec4e4488cfd91d701cc7e740e48a (patch) | |
| tree | 696008fcae1aab87d4dddfcb367f3db62c848b84 /numpy | |
| parent | 40a1d54edd06309ea4a092455e9154a8c31c1070 (diff) | |
| download | numpy-6c3cabd8227dec4e4488cfd91d701cc7e740e48a.tar.gz | |
TST: Don't fail check_large_zip on signal 9
If the test is terminated for lack of memory the intended zip file check
does not take place, raise xfail instead.
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/lib/tests/test_io.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index aa4499764..534ab683c 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -580,7 +580,7 @@ class TestSaveTxt: 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: |
