MCPcopy Create free account
hub / github.com/numpy/numpy / test_reveal

Function test_reveal

numpy/typing/tests/test_typing.py:232–244  ·  view source on GitHub ↗

Validate that mypy correctly infers the return-types of the expressions in `path`.

(path: str)

Source from the content-addressed store, hash-verified

230@pytest.mark.skipif(NO_MYPY, reason="Mypy is not installed")
231@pytest.mark.parametrize("path", get_test_cases(REVEAL_DIR))
232def test_reveal(path: str) -> None:
233 """Validate that mypy correctly infers the return-types of
234 the expressions in `path`.
235 """
236 __tracebackhide__ = True
237
238 output_mypy = OUTPUT_MYPY
239 if path not in output_mypy:
240 return
241
242 for error_line in output_mypy[path]:
243 lineno, error_line = _strip_filename(error_line)
244 raise AssertionError(_REVEAL_MSG.format(lineno, error_line))
245
246
247@pytest.mark.slow

Callers

nothing calls this directly

Calls 1

_strip_filenameFunction · 0.85

Tested by

no test coverage detected