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

Method test_exit_propagates

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

Source from the content-addressed store, hash-verified

397 assert rep.when == "call"
398
399 def test_exit_propagates(self, pytester: Pytester) -> None:
400 try:
401 pytester.runitem(
402 """
403 import pytest
404 def test_func():
405 raise pytest.exit.Exception()
406 """
407 )
408 except pytest.exit.Exception:
409 pass
410 else:
411 assert False, "did not raise"
412
413
414class TestExecutionNonForked(BaseFunctionalTests):

Callers

nothing calls this directly

Calls 1

runitemMethod · 0.45

Tested by

no test coverage detected