(pytester: Pytester)
| 1590 | |
| 1591 | |
| 1592 | def 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 | |
| 1607 | def test_stop_iteration_runtest_protocol(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected