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

Method test_collectreport_fail

testing/test_reports.py:196–208  ·  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

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

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected