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

Method test_collectonly_error

testing/test_terminal.py:496–509  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

494 )
495
496 def test_collectonly_error(self, pytester: Pytester) -> None:
497 p = pytester.makepyfile("import Errlkjqweqwe")
498 result = pytester.runpytest("--collect-only", p)
499 assert result.ret == 2
500 result.stdout.fnmatch_lines(
501 textwrap.dedent(
502 """\
503 *ERROR*
504 *ImportError*
505 *No module named *Errlk*
506 *1 error*
507 """
508 ).strip()
509 )
510
511 def test_collectonly_missing_path(self, pytester: Pytester) -> None:
512 """Issue 115: failure in parseargs will cause session not to

Callers

nothing calls this directly

Calls 4

fnmatch_linesMethod · 0.80
stripMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected