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

Function test_collecterror

testing/test_terminal.py:2337–2351  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

2335
2336
2337def test_collecterror(pytester: Pytester) -> None:
2338 p1 = pytester.makepyfile("raise SyntaxError()")
2339 result = pytester.runpytest("-ra", str(p1))
2340 result.stdout.fnmatch_lines(
2341 [
2342 "collected 0 items / 1 error",
2343 "*= ERRORS =*",
2344 "*_ ERROR collecting test_collecterror.py _*",
2345 "E SyntaxError: *",
2346 "*= short test summary info =*",
2347 "ERROR test_collecterror.py",
2348 "*! Interrupted: 1 error during collection !*",
2349 "*= 1 error in *",
2350 ]
2351 )
2352
2353
2354def test_no_summary_collecterror(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected