diff options
author | Bas van Beek <b.f.van.beek@vu.nl> | 2021-02-12 17:34:02 +0100 |
---|---|---|
committer | Bas van Beek <b.f.van.beek@vu.nl> | 2021-03-04 12:48:50 +0100 |
commit | 0148bf8cdd7577730af8f1418c3a92dfad82595a (patch) | |
tree | 47e664a357d3a3dbc8f8c49d7aaee7b7be234bbc | |
parent | cb557b79fa0ce467c881830f8e8e042c484ccfaa (diff) | |
download | numpy-0148bf8cdd7577730af8f1418c3a92dfad82595a.tar.gz |
TST: Validate the mypy exit-code
Any value other than 0 and 1 is indicative of some sort of crash
-rw-r--r-- | numpy/typing/tests/test_typing.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/typing/tests/test_typing.py b/numpy/typing/tests/test_typing.py index 70355dcd9..d6db68c83 100644 --- a/numpy/typing/tests/test_typing.py +++ b/numpy/typing/tests/test_typing.py @@ -57,7 +57,7 @@ def run_mypy() -> None: for directory in (PASS_DIR, REVEAL_DIR, FAIL_DIR, MISC_DIR): # Run mypy - stdout, stderr, _ = api.run([ + stdout, stderr, exit_code = api.run([ "--config-file", MYPY_INI, "--cache-dir", @@ -65,6 +65,7 @@ def run_mypy() -> None: directory, ]) assert not stderr, directory + assert exit_code in {0, 1}, stdout stdout = stdout.replace('*', '') # Parse the output |