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

Method test_collectonly_error

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

Source from the content-addressed store, hash-verified

576 )
577
578 def test_collectonly_error(self, pytester: Pytester) -> None:
579 p = pytester.makepyfile("import Errlkjqweqwe")
580 result = pytester.runpytest("--collect-only", p)
581 assert result.ret == 2
582 result.stdout.fnmatch_lines(
583 textwrap.dedent(
584 """\
585 *ERROR*
586 *ImportError*
587 *No module named *Errlk*
588 *1 error*
589 """
590 ).strip()
591 )
592
593 def test_collectonly_missing_path(self, pytester: Pytester) -> None:
594 """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