(
self, monkeypatch: MonkeyPatch, pytester: Pytester, request
)
| 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 |
nothing calls this directly
no test coverage detected