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

Method test_minus_x_import_error

testing/test_session.py:239–245  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

237 assert len(colfail) == 1
238
239 def test_minus_x_import_error(self, pytester: Pytester) -> None:
240 pytester.makepyfile(__init__="")
241 pytester.makepyfile(test_one="xxxx", test_two="yyyy")
242 reprec = pytester.inline_run("-x", pytester.path)
243 finished = reprec.getreports("pytest_collectreport")
244 colfail = [x for x in finished if x.failed]
245 assert len(colfail) == 1
246
247 def test_minus_x_overridden_by_maxfail(self, pytester: Pytester) -> None:
248 pytester.makepyfile(__init__="")

Callers

nothing calls this directly

Calls 3

makepyfileMethod · 0.45
inline_runMethod · 0.45
getreportsMethod · 0.45

Tested by

no test coverage detected