(self)
| 1499 | stats=2) |
| 1500 | |
| 1501 | def test_rerun_fail(self): |
| 1502 | # FAILURE then FAILURE |
| 1503 | code = textwrap.dedent(""" |
| 1504 | import unittest |
| 1505 | |
| 1506 | class Tests(unittest.TestCase): |
| 1507 | def test_succeed(self): |
| 1508 | return |
| 1509 | |
| 1510 | def test_fail_always(self): |
| 1511 | # test that always fails |
| 1512 | self.fail("bug") |
| 1513 | """) |
| 1514 | testname = self.create_test(code=code) |
| 1515 | |
| 1516 | output = self.run_tests("--rerun", testname, exitcode=EXITCODE_BAD_TEST) |
| 1517 | self.check_executed_tests(output, [testname], |
| 1518 | rerun=Rerun(testname, |
| 1519 | "test_fail_always", |
| 1520 | success=False), |
| 1521 | stats=TestStats(3, 2)) |
| 1522 | |
| 1523 | def test_rerun_success(self): |
| 1524 | # FAILURE then SUCCESS |
nothing calls this directly
no test coverage detected