(self)
| 1687 | stats=2) |
| 1688 | |
| 1689 | def test_rerun_setup_hook_failure(self): |
| 1690 | # FAILURE then FAILURE |
| 1691 | code = textwrap.dedent(""" |
| 1692 | import unittest |
| 1693 | |
| 1694 | class ExampleTests(unittest.TestCase): |
| 1695 | def setUp(self): |
| 1696 | raise RuntimeError('Fail') |
| 1697 | |
| 1698 | def test_success(self): |
| 1699 | return |
| 1700 | """) |
| 1701 | testname = self.create_test(code=code) |
| 1702 | |
| 1703 | output = self.run_tests("--rerun", testname, exitcode=EXITCODE_BAD_TEST) |
| 1704 | self.check_executed_tests(output, testname, |
| 1705 | failed=[testname], |
| 1706 | rerun=Rerun(testname, |
| 1707 | match="test_success", |
| 1708 | success=False), |
| 1709 | stats=2) |
| 1710 | |
| 1711 | def test_rerun_teardown_hook_failure(self): |
| 1712 | # FAILURE then FAILURE |
nothing calls this directly
no test coverage detected