MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_error_diff

Function test_error_diff

testing/test_error_diffs.py:278–283  ·  view source on GitHub ↗
(code: str, expected: str, pytester: Pytester)

Source from the content-addressed store, hash-verified

276
277@pytest.mark.parametrize("code, expected", TESTCASES)
278def test_error_diff(code: str, expected: str, pytester: Pytester) -> None:
279 expected_lines = [line.lstrip() for line in expected.splitlines()]
280 p = pytester.makepyfile(code)
281 result = pytester.runpytest(p, "-vv")
282 result.stdout.fnmatch_lines(expected_lines)
283 assert result.ret == 1

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected