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

Method test_no_header

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

Source from the content-addressed store, hash-verified

986 )
987
988 def test_no_header(self, pytester: Pytester) -> None:
989 pytester.path.joinpath("tests").mkdir()
990 pytester.path.joinpath("gui").mkdir()
991
992 # with testpaths option, and not passing anything in the command-line
993 pytester.makeini(
994 """
995 [pytest]
996 testpaths = tests gui
997 """
998 )
999 result = pytester.runpytest("--no-header")
1000 result.stdout.no_fnmatch_line(
1001 "rootdir: *test_header0, inifile: tox.ini, testpaths: tests, gui"
1002 )
1003
1004 # with testpaths option, passing directory in command-line: do not show testpaths then
1005 result = pytester.runpytest("tests", "--no-header")
1006 result.stdout.no_fnmatch_line("rootdir: *test_header0, inifile: tox.ini")
1007
1008 def test_no_summary(self, pytester: Pytester) -> None:
1009 p1 = pytester.makepyfile(

Callers

nothing calls this directly

Calls 4

no_fnmatch_lineMethod · 0.80
mkdirMethod · 0.45
makeiniMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected