()
| 1831 | await asyncio.sleep(dt) |
| 1832 | |
| 1833 | async def doit(): |
| 1834 | sleeper = self.new_task(loop, sleep(5000)) |
| 1835 | loop.call_later(0.1, sleeper.cancel) |
| 1836 | try: |
| 1837 | await sleeper |
| 1838 | except asyncio.CancelledError: |
| 1839 | return 'cancelled' |
| 1840 | else: |
| 1841 | return 'slept in' |
| 1842 | |
| 1843 | doer = doit() |
| 1844 | self.assertEqual(loop.run_until_complete(doer), 'cancelled') |
nothing calls this directly
no test coverage detected