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

Function test_issue333_result_clearing

testing/test_unittest.py:951–971  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

949
950
951def test_issue333_result_clearing(pytester: Pytester) -> None:
952 pytester.makeconftest(
953 """
954 import pytest
955 @pytest.hookimpl(hookwrapper=True)
956 def pytest_runtest_call(item):
957 yield
958 assert 0
959 """
960 )
961 pytester.makepyfile(
962 """
963 import unittest
964 class TestIt(unittest.TestCase):
965 def test_func(self):
966 0/0
967 """
968 )
969
970 reprec = pytester.inline_run()
971 reprec.assertoutcome(failed=1)
972
973
974def test_unittest_raise_skip_issue748(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 4

assertoutcomeMethod · 0.80
makeconftestMethod · 0.45
makepyfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected