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

Function _test_fail

numpy/typing/tests/test_typing.py:208–220  ·  view source on GitHub ↗
(
    path: str,
    expression: str,
    error: str,
    expected_error: None | str,
    lineno: int,
)

Source from the content-addressed store, hash-verified

206
207
208def _test_fail(
209 path: str,
210 expression: str,
211 error: str,
212 expected_error: None | str,
213 lineno: int,
214) -> None:
215 if expected_error is None:
216 raise AssertionError(_FAIL_MSG1.format(lineno, expression, error))
217 elif error not in expected_error:
218 raise AssertionError(_FAIL_MSG2.format(
219 lineno, expression, expected_error, error
220 ))
221
222
223_REVEAL_MSG = """Reveal mismatch at line {}

Callers 2

test_failFunction · 0.85
test_extended_precisionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected