diff options
author | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2021-07-21 11:45:07 +0200 |
---|---|---|
committer | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2021-07-21 11:45:42 +0200 |
commit | 1ff314dc000cb0a7a1bb2823d3bc3ac4171f9d16 (patch) | |
tree | 3b023845afd8040a80af943ae1ad1f4cf85c66d3 /numpy/tests | |
parent | ee9855823c41c0f5d4d2aa81e1965e898a375fbe (diff) | |
download | numpy-1ff314dc000cb0a7a1bb2823d3bc3ac4171f9d16.tar.gz |
TST: Validate the return code of `test_full_reimport`
All errors raised within the sub process will remain silenced if the return code isn't validated
Diffstat (limited to 'numpy/tests')
-rw-r--r-- | numpy/tests/test_reloading.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/numpy/tests/test_reloading.py b/numpy/tests/test_reloading.py index 5c4309f4a..8d8c8aa34 100644 --- a/numpy/tests/test_reloading.py +++ b/numpy/tests/test_reloading.py @@ -57,5 +57,8 @@ def test_full_reimport(): with warns(UserWarning): import numpy as np """) - p = subprocess.run([sys.executable, '-c', code]) - + p = subprocess.run([sys.executable, '-c', code], capture_output=True) + if p.returncode: + raise AssertionError( + f"Non-zero return code: {p.returncode!r}\n\n{p.stderr.decode()}" + ) |