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

Method test_collect_fail

testing/test_terminal.py:1358–1363  ·  view source on GitHub ↗
(self, pytester: Pytester, option)

Source from the content-addressed store, hash-verified

1356 run e.g. distributed tests."""
1357
1358 def test_collect_fail(self, pytester: Pytester, option) -> None:
1359 pytester.makepyfile("import xyz\n")
1360 result = pytester.runpytest(*option.args)
1361 result.stdout.fnmatch_lines(
1362 ["ImportError while importing*", "*No module named *xyz*", "*1 error*"]
1363 )
1364
1365 def test_maxfailures(self, pytester: Pytester, option) -> None:
1366 pytester.makepyfile(

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected