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

Method test_collectonly_basic

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

Source from the content-addressed store, hash-verified

406
407class TestCollectonly:
408 def test_collectonly_basic(self, pytester: Pytester) -> None:
409 pytester.makepyfile(
410 """
411 def test_func():
412 pass
413 """
414 )
415 result = pytester.runpytest("--collect-only")
416 result.stdout.fnmatch_lines(
417 ["<Module test_collectonly_basic.py>", " <Function test_func>"]
418 )
419
420 def test_collectonly_skipped_module(self, pytester: Pytester) -> None:
421 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