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

Method test_header_trailer_info

testing/test_terminal.py:896–918  ·  view source on GitHub ↗
(
        self, monkeypatch: MonkeyPatch, pytester: Pytester, request
    )

Source from the content-addressed store, hash-verified

894 assert result.ret == 0
895
896 def test_header_trailer_info(
897 self, monkeypatch: MonkeyPatch, pytester: Pytester, request
898 ) -> None:
899 monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD")
900 monkeypatch.delenv("PYTEST_PLUGINS", raising=False)
901 pytester.makepyfile(
902 """
903 def test_passes():
904 pass
905 """
906 )
907 result = pytester.runpytest()
908 verinfo = ".".join(map(str, sys.version_info[:3]))
909 result.stdout.fnmatch_lines(
910 [
911 "*===== test session starts ====*",
912 f"platform {sys.platform} -- Python {verinfo}*pytest-{pytest.__version__}**pluggy-{pluggy.__version__}",
913 "*test_header_trailer_info.py .*",
914 "=* 1 passed*in *.[0-9][0-9]s *=",
915 ]
916 )
917 if request.config.pluginmanager.list_plugin_distinfo():
918 result.stdout.fnmatch_lines(["plugins: *"])
919
920 def test_no_header_trailer_info(
921 self, monkeypatch: MonkeyPatch, pytester: Pytester, request

Callers

nothing calls this directly

Calls 5

delenvMethod · 0.80
joinMethod · 0.80
fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected