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

Function test_issue1073_conftest_special_objects

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

Source from the content-addressed store, hash-verified

622
623
624def test_issue1073_conftest_special_objects(pytester: Pytester) -> None:
625 pytester.makeconftest(
626 """\
627 class DontTouchMe(object):
628 def __getattr__(self, x):
629 raise Exception('cant touch me')
630
631 x = DontTouchMe()
632 """
633 )
634 pytester.makepyfile(
635 """\
636 def test_some():
637 pass
638 """
639 )
640 res = pytester.runpytest()
641 assert res.ret == 0
642
643
644def test_conftest_exception_handling(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

makeconftestMethod · 0.45
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected