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

Method test_collectonly_basic

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

Source from the content-addressed store, hash-verified

483
484class TestCollectonly:
485 def test_collectonly_basic(self, pytester: Pytester) -> None:
486 pytester.makepyfile(
487 """
488 def test_func():
489 pass
490 """
491 )
492 result = pytester.runpytest("--collect-only")
493 result.stdout.fnmatch_lines(
494 [
495 "<Dir test_collectonly_basic0>",
496 " <Module test_collectonly_basic.py>",
497 " <Function test_func>",
498 ]
499 )
500
501 def test_collectonly_skipped_module(self, pytester: Pytester) -> None:
502 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