(self)
| 1731 | stats=2) |
| 1732 | |
| 1733 | def test_rerun_async_setup_hook_failure(self): |
| 1734 | # FAILURE then FAILURE |
| 1735 | code = textwrap.dedent(""" |
| 1736 | import unittest |
| 1737 | |
| 1738 | class ExampleTests(unittest.IsolatedAsyncioTestCase): |
| 1739 | async def asyncSetUp(self): |
| 1740 | raise RuntimeError('Fail') |
| 1741 | |
| 1742 | async def test_success(self): |
| 1743 | return |
| 1744 | """) |
| 1745 | testname = self.create_test(code=code) |
| 1746 | |
| 1747 | output = self.run_tests("--rerun", testname, exitcode=EXITCODE_BAD_TEST) |
| 1748 | self.check_executed_tests(output, testname, |
| 1749 | rerun=Rerun(testname, |
| 1750 | match="test_success", |
| 1751 | success=False), |
| 1752 | stats=2) |
| 1753 | |
| 1754 | def test_rerun_async_teardown_hook_failure(self): |
| 1755 | # FAILURE then FAILURE |
nothing calls this directly
no test coverage detected