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

Function test_conftest_exception_handling

testing/test_conftest.py:644–658  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

642
643
644def test_conftest_exception_handling(pytester: Pytester) -> None:
645 pytester.makeconftest(
646 """\
647 raise ValueError()
648 """
649 )
650 pytester.makepyfile(
651 """\
652 def test_some():
653 pass
654 """
655 )
656 res = pytester.runpytest()
657 assert res.ret == 4
658 assert "raise ValueError()" in [line.strip() for line in res.errlines]
659
660
661def test_hook_proxy(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 4

stripMethod · 0.80
makeconftestMethod · 0.45
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected