MCPcopy
hub / github.com/pytest-dev/pytest / test_stop_iteration_from_collect

Function test_stop_iteration_from_collect

testing/acceptance_test.py:1592–1604  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

1590
1591
1592def test_stop_iteration_from_collect(pytester: Pytester) -> None:
1593 pytester.makepyfile(test_it="raise StopIteration('hello')")
1594 result = pytester.runpytest()
1595 assert result.ret == ExitCode.INTERRUPTED
1596 result.assert_outcomes(failed=0, passed=0, errors=1)
1597 result.stdout.fnmatch_lines(
1598 [
1599 "=* short test summary info =*",
1600 "ERROR test_it.py - StopIteration: hello",
1601 "!* Interrupted: 1 error during collection !*",
1602 "=* 1 error in * =*",
1603 ]
1604 )
1605
1606
1607def test_stop_iteration_runtest_protocol(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 4

assert_outcomesMethod · 0.80
fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected