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

Function test_pytest_exit_msg

testing/test_runner.py:563–573  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

561
562
563def test_pytest_exit_msg(pytester: Pytester) -> None:
564 pytester.makeconftest(
565 """
566 import pytest
567
568 def pytest_configure(config):
569 pytest.exit('oh noes')
570 """
571 )
572 result = pytester.runpytest()
573 result.stderr.fnmatch_lines(["Exit: oh noes"])
574
575
576def _strip_resource_warnings(lines):

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makeconftestMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected