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

Method test_exit_propagates

testing/test_runner.py:463–475  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

461 assert rep.when == "call"
462
463 def test_exit_propagates(self, pytester: Pytester) -> None:
464 try:
465 pytester.runitem(
466 """
467 import pytest
468 def test_func():
469 raise pytest.exit.Exception()
470 """
471 )
472 except pytest.exit.Exception:
473 pass
474 else:
475 assert False, "did not raise"
476
477
478class TestExecutionNonForked(BaseFunctionalTests):

Callers

nothing calls this directly

Calls 1

runitemMethod · 0.45

Tested by

no test coverage detected