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

Method test_show_runtest_logstart

testing/test_terminal.py:129–137  ·  view source on GitHub ↗
(self, pytester: Pytester, linecomp)

Source from the content-addressed store, hash-verified

127 assert lines[2] == "hello world"
128
129 def test_show_runtest_logstart(self, pytester: Pytester, linecomp) -> None:
130 item = pytester.getitem("def test_func(): pass")
131 tr = TerminalReporter(item.config, file=linecomp.stringio)
132 item.config.pluginmanager.register(tr)
133 location = item.reportinfo()
134 tr.config.hook.pytest_runtest_logstart(
135 nodeid=item.nodeid, location=location, fspath=str(item.path)
136 )
137 linecomp.assert_contains_lines(["*test_show_runtest_logstart.py*"])
138
139 def test_runtest_location_shown_before_test_starts(
140 self, pytester: Pytester

Callers

nothing calls this directly

Calls 6

TerminalReporterClass · 0.90
registerMethod · 0.80
assert_contains_linesMethod · 0.80
getitemMethod · 0.45
reportinfoMethod · 0.45

Tested by

no test coverage detected