(self)
| 1709 | stats=2) |
| 1710 | |
| 1711 | def test_rerun_teardown_hook_failure(self): |
| 1712 | # FAILURE then FAILURE |
| 1713 | code = textwrap.dedent(""" |
| 1714 | import unittest |
| 1715 | |
| 1716 | class ExampleTests(unittest.TestCase): |
| 1717 | def tearDown(self): |
| 1718 | raise RuntimeError('Fail') |
| 1719 | |
| 1720 | def test_success(self): |
| 1721 | return |
| 1722 | """) |
| 1723 | testname = self.create_test(code=code) |
| 1724 | |
| 1725 | output = self.run_tests("--rerun", testname, exitcode=EXITCODE_BAD_TEST) |
| 1726 | self.check_executed_tests(output, testname, |
| 1727 | failed=[testname], |
| 1728 | rerun=Rerun(testname, |
| 1729 | match="test_success", |
| 1730 | success=False), |
| 1731 | stats=2) |
| 1732 | |
| 1733 | def test_rerun_async_setup_hook_failure(self): |
| 1734 | # FAILURE then FAILURE |
nothing calls this directly
no test coverage detected