summaryrefslogtreecommitdiff
path: root/numpy/typing/tests
diff options
context:
space:
mode:
authorBas van Beek <b.f.van.beek@vu.nl>2021-10-01 11:24:13 +0200
committerBas van Beek <b.f.van.beek@vu.nl>2021-10-04 23:19:21 +0200
commitc8ca547dc0a8793c8e798ea9de50db8f76ae2b6f (patch)
tree5a93d4a1d37d354dfaf2d27ead8e6eeae6928725 /numpy/typing/tests
parent0324298dd7e5fa6197e6a2d40407941e86477a72 (diff)
downloadnumpy-c8ca547dc0a8793c8e798ea9de50db8f76ae2b6f.tar.gz
TST: Summarize the line number when `test_fail` receives unexpected mypy outputs
Diffstat (limited to 'numpy/typing/tests')
-rw-r--r--numpy/typing/tests/test_typing.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/typing/tests/test_typing.py b/numpy/typing/tests/test_typing.py
index 0f3e10b7b..f303ebea3 100644
--- a/numpy/typing/tests/test_typing.py
+++ b/numpy/typing/tests/test_typing.py
@@ -160,7 +160,9 @@ def test_fail(path: str) -> None:
expected_error = errors.get(lineno)
_test_fail(path, marker, expected_error, lineno)
else:
- pytest.fail(f"Unexpected mypy output\n\n{errors[lineno]}")
+ pytest.fail(
+ f"Unexpected mypy output at line {lineno}\n\n{errors[lineno]}"
+ )
_FAIL_MSG1 = """Extra error at line {}