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

Method test_collectreport_fail

testing/test_reports.py:197–209  ·  view source on GitHub ↗

This test came originally from test_remote.py in xdist (ca03269).

(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

195 assert newrep.skipped == rep.skipped
196
197 def test_collectreport_fail(self, pytester: Pytester) -> None:
198 """This test came originally from test_remote.py in xdist (ca03269)."""
199 reprec = pytester.inline_runsource("qwe abc")
200 reports = reprec.getreports("pytest_collectreport")
201 assert reports
202 for rep in reports:
203 d = rep._to_json()
204 newrep = CollectReport._from_json(d)
205 assert newrep.passed == rep.passed
206 assert newrep.failed == rep.failed
207 assert newrep.skipped == rep.skipped
208 if rep.failed:
209 assert newrep.longrepr == str(rep.longrepr)
210
211 def test_extended_report_deserialization(self, pytester: Pytester) -> None:
212 """This test came originally from test_remote.py in xdist (ca03269)."""

Callers

nothing calls this directly

Calls 4

inline_runsourceMethod · 0.45
getreportsMethod · 0.45
_to_jsonMethod · 0.45
_from_jsonMethod · 0.45

Tested by

no test coverage detected