mirror of https://github.com/MagicStack/uvloop.git
tests: Improve test_task_context_4
This commit is contained in:
parent
8604b0361a
commit
ee054206b0
|
@ -129,11 +129,12 @@ class _ContextBaseTests:
|
|||
ref = weakref.ref(tracked)
|
||||
|
||||
async def sub():
|
||||
cvar.set(tracked)
|
||||
cvar.set(tracked) # NoQA
|
||||
self.loop.call_soon(lambda: None)
|
||||
|
||||
async def main():
|
||||
await self.loop.create_task(sub())
|
||||
await asyncio.sleep(0.01, loop=self.loop)
|
||||
|
||||
task = self.loop.create_task(main())
|
||||
self.loop.run_until_complete(task)
|
||||
|
|
Loading…
Reference in New Issue