(self)
| 1643 | stats=2) |
| 1644 | |
| 1645 | def test_rerun_setup_module_hook_failure(self): |
| 1646 | # FAILURE then FAILURE |
| 1647 | code = textwrap.dedent(""" |
| 1648 | import unittest |
| 1649 | |
| 1650 | def setUpModule(): |
| 1651 | raise RuntimeError('Fail') |
| 1652 | |
| 1653 | class ExampleTests(unittest.TestCase): |
| 1654 | def test_success(self): |
| 1655 | return |
| 1656 | """) |
| 1657 | testname = self.create_test(code=code) |
| 1658 | |
| 1659 | output = self.run_tests("--rerun", testname, exitcode=EXITCODE_BAD_TEST) |
| 1660 | self.check_executed_tests(output, testname, |
| 1661 | failed=[testname], |
| 1662 | rerun=Rerun(testname, |
| 1663 | match=None, |
| 1664 | success=False), |
| 1665 | stats=0) |
| 1666 | |
| 1667 | def test_rerun_teardown_module_hook_failure(self): |
| 1668 | # FAILURE then FAILURE |
nothing calls this directly
no test coverage detected