()
| 85 | assert isinstance(e, asyncio.CancelledError), "Expected asyncio.CancelledError" |
| 86 | |
| 87 | async def test_cancel(): |
| 88 | print("test_cancel") |
| 89 | future = Future() |
| 90 | asyncio.create_task(cancel_later(future, 0.1)) |
| 91 | try: |
| 92 | await future |
| 93 | assert False, "Expected an exception but none was raised" |
| 94 | except asyncio.CancelledError as e: |
| 95 | assert isinstance(e, asyncio.CancelledError), "Expected asyncio.CancelledError" |
| 96 | |
| 97 | async def test_race_cancel(): |
| 98 | print("test_race_cancel") |
no test coverage detected
searching dependent graphs…