(self)
| 1597 | os_helper.unlink(marker_filename) |
| 1598 | |
| 1599 | def test_rerun_setup_class_hook_failure(self): |
| 1600 | # FAILURE then FAILURE |
| 1601 | code = textwrap.dedent(""" |
| 1602 | import unittest |
| 1603 | |
| 1604 | class ExampleTests(unittest.TestCase): |
| 1605 | @classmethod |
| 1606 | def setUpClass(self): |
| 1607 | raise RuntimeError('Fail') |
| 1608 | |
| 1609 | def test_success(self): |
| 1610 | return |
| 1611 | """) |
| 1612 | testname = self.create_test(code=code) |
| 1613 | |
| 1614 | output = self.run_tests("--rerun", testname, exitcode=EXITCODE_BAD_TEST) |
| 1615 | self.check_executed_tests(output, testname, |
| 1616 | failed=[testname], |
| 1617 | rerun=Rerun(testname, |
| 1618 | match="ExampleTests", |
| 1619 | success=False), |
| 1620 | stats=0) |
| 1621 | |
| 1622 | def test_rerun_teardown_class_hook_failure(self): |
| 1623 | # FAILURE then FAILURE |
nothing calls this directly
no test coverage detected