(self)
| 1532 | stats=2) |
| 1533 | |
| 1534 | def test_rerun_fail(self): |
| 1535 | # FAILURE then FAILURE |
| 1536 | code = textwrap.dedent(""" |
| 1537 | import unittest |
| 1538 | |
| 1539 | class Tests(unittest.TestCase): |
| 1540 | def test_succeed(self): |
| 1541 | return |
| 1542 | |
| 1543 | def test_fail_always(self): |
| 1544 | # test that always fails |
| 1545 | self.fail("bug") |
| 1546 | """) |
| 1547 | testname = self.create_test(code=code) |
| 1548 | |
| 1549 | output = self.run_tests("--rerun", testname, exitcode=EXITCODE_BAD_TEST) |
| 1550 | self.check_executed_tests(output, [testname], |
| 1551 | rerun=Rerun(testname, |
| 1552 | "test_fail_always", |
| 1553 | success=False), |
| 1554 | stats=TestStats(3, 2)) |
| 1555 | |
| 1556 | def test_rerun_success(self): |
| 1557 | # FAILURE then SUCCESS |
nothing calls this directly
no test coverage detected