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

Function test_makereport_getsource

testing/test_runner.py:834–844  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

832
833
834def test_makereport_getsource(pytester: Pytester) -> None:
835 pytester.makepyfile(
836 """
837 def test_foo():
838 if False: pass
839 else: assert False
840 """
841 )
842 result = pytester.runpytest()
843 result.stdout.no_fnmatch_line("*INTERNALERROR*")
844 result.stdout.fnmatch_lines(["*else: assert False*"])
845
846
847def test_makereport_getsource_dynamic_code(

Callers

nothing calls this directly

Calls 4

no_fnmatch_lineMethod · 0.80
fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected