(self)
| 867 | self.assertFalse(t.cancel()) |
| 868 | |
| 869 | def test_cancel_inner_future(self): |
| 870 | f = self.new_future(self.loop) |
| 871 | |
| 872 | async def task(): |
| 873 | await f |
| 874 | return 12 |
| 875 | |
| 876 | t = self.new_task(self.loop, task()) |
| 877 | test_utils.run_briefly(self.loop) # start task |
| 878 | f.cancel() |
| 879 | with self.assertRaises(asyncio.CancelledError): |
| 880 | self.loop.run_until_complete(t) |
| 881 | self.assertTrue(f.cancelled()) |
| 882 | self.assertTrue(t.cancelled()) |
| 883 | |
| 884 | def test_cancel_both_task_and_inner_future(self): |
| 885 | f = self.new_future(self.loop) |
nothing calls this directly
no test coverage detected