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

Method test_no_header

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

Source from the content-addressed store, hash-verified

892 )
893
894 def test_no_header(self, pytester: Pytester) -> None:
895 pytester.path.joinpath("tests").mkdir()
896 pytester.path.joinpath("gui").mkdir()
897
898 # with testpaths option, and not passing anything in the command-line
899 pytester.makeini(
900 """
901 [pytest]
902 testpaths = tests gui
903 """
904 )
905 result = pytester.runpytest("--no-header")
906 result.stdout.no_fnmatch_line(
907 "rootdir: *test_header0, inifile: tox.ini, testpaths: tests, gui"
908 )
909
910 # with testpaths option, passing directory in command-line: do not show testpaths then
911 result = pytester.runpytest("tests", "--no-header")
912 result.stdout.no_fnmatch_line("rootdir: *test_header0, inifile: tox.ini")
913
914 def test_no_summary(self, pytester: Pytester) -> None:
915 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