(self)
| 1654 | stats=2) |
| 1655 | |
| 1656 | def test_rerun_setup_hook_failure(self): |
| 1657 | # FAILURE then FAILURE |
| 1658 | code = textwrap.dedent(""" |
| 1659 | import unittest |
| 1660 | |
| 1661 | class ExampleTests(unittest.TestCase): |
| 1662 | def setUp(self): |
| 1663 | raise RuntimeError('Fail') |
| 1664 | |
| 1665 | def test_success(self): |
| 1666 | return |
| 1667 | """) |
| 1668 | testname = self.create_test(code=code) |
| 1669 | |
| 1670 | output = self.run_tests("--rerun", testname, exitcode=EXITCODE_BAD_TEST) |
| 1671 | self.check_executed_tests(output, testname, |
| 1672 | failed=[testname], |
| 1673 | rerun=Rerun(testname, |
| 1674 | match="test_success", |
| 1675 | success=False), |
| 1676 | stats=2) |
| 1677 | |
| 1678 | def test_rerun_teardown_hook_failure(self): |
| 1679 | # FAILURE then FAILURE |
nothing calls this directly
no test coverage detected