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

Function test_run_result_repr

testing/test_pytester.py:740–756  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

738
739
740def 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
759def test_pytester_outcomes_with_multiple_errors(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected