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

Function test_conftest_exception_handling

testing/test_conftest.py:750–764  ·  testing/test_conftest.py::test_conftest_exception_handling
(pytester: Pytester)

Source from the content-addressed store, hash-verified

748
749
750def test_conftest_exception_handling(pytester: Pytester) -> None:
751 pytester.makeconftest(
752 class="st">"""\
753 raise ValueError()
754 class="st">"""
755 )
756 pytester.makepyfile(
757 class="st">"""\
758 def test_some():
759 pass
760 class="st">"""
761 )
762 res = pytester.runpytest()
763 assert res.ret == 4
764 assert class="st">"raise ValueError()" in [line.strip() for line in res.errlines]
765
766
767def 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