MCPcopy
hub / github.com/pytest-dev/pytest / test_show_runtest_logstart

Method test_show_runtest_logstart

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

Source from the content-addressed store, hash-verified

159 assert lines[2] == "hello world"
160
161 def test_show_runtest_logstart(self, pytester: Pytester, linecomp) -> None:
162 item = pytester.getitem("def test_func(): pass")
163 tr = TerminalReporter(item.config, file=linecomp.stringio)
164 item.config.pluginmanager.register(tr)
165 location = item.reportinfo()
166 tr.config.hook.pytest_runtest_logstart(
167 nodeid=item.nodeid, location=location, fspath=str(item.path)
168 )
169 linecomp.assert_contains_lines(["*test_show_runtest_logstart.py*"])
170
171 def test_runtest_location_shown_before_test_starts(
172 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