()
| 738 | |
| 739 | |
| 740 | def test_run_result_repr() -> None: |
| 741 | outlines = ["some", "normal", "output"] |
| 742 | errlines = ["some", "nasty", "errors", "happened"] |
| 743 | |
| 744 | # known exit code |
| 745 | r = pytester_mod.RunResult(1, outlines, errlines, duration=0.5) |
| 746 | assert ( |
| 747 | repr(r) == "<RunResult ret=ExitCode.TESTS_FAILED len(stdout.lines)=3" |
| 748 | " len(stderr.lines)=4 duration=0.50s>" |
| 749 | ) |
| 750 | |
| 751 | # unknown exit code: just the number |
| 752 | r = pytester_mod.RunResult(99, outlines, errlines, duration=0.5) |
| 753 | assert ( |
| 754 | repr(r) == "<RunResult ret=99 len(stdout.lines)=3" |
| 755 | " len(stderr.lines)=4 duration=0.50s>" |
| 756 | ) |
| 757 | |
| 758 | |
| 759 | def test_pytester_outcomes_with_multiple_errors(pytester: Pytester) -> None: |
nothing calls this directly
no outgoing calls
no test coverage detected