summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBas van Beek <b.f.van.beek@vu.nl>2021-02-01 23:56:27 +0100
committerBas van Beek <b.f.van.beek@vu.nl>2021-02-05 17:55:00 +0100
commitb3e44cc6e5ba721670c245bc620a0bd7e2913630 (patch)
tree38ab75eb155ee07b0f7c4f94cee0d6b114a7d40e
parent92d6159e08d3773d52f6ea86753aef417e5fa8c3 (diff)
downloadnumpy-b3e44cc6e5ba721670c245bc620a0bd7e2913630.tar.gz
TST: Provide a more useful exception message if the `pass` tests fail
-rw-r--r--numpy/typing/tests/test_typing.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/typing/tests/test_typing.py b/numpy/typing/tests/test_typing.py
index 324312a92..fc42e87b1 100644
--- a/numpy/typing/tests/test_typing.py
+++ b/numpy/typing/tests/test_typing.py
@@ -89,7 +89,8 @@ def get_test_cases(directory):
def test_success(path):
# Alias `OUTPUT_MYPY` so that it appears in the local namespace
output_mypy = OUTPUT_MYPY
- assert path not in output_mypy
+ if path in output_mypy:
+ raise AssertionError("\n".join(v for v in output_mypy[path].values()))
@pytest.mark.slow