Skip to content

Commit ee05420

Browse files
committed
tests: Improve test_task_context_4
1 parent 8604b03 commit ee05420

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_context.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,12 @@ class TrackMe:
129129
ref = weakref.ref(tracked)
130130

131131
async def sub():
132-
cvar.set(tracked)
132+
cvar.set(tracked) # NoQA
133133
self.loop.call_soon(lambda: None)
134134

135135
async def main():
136136
await self.loop.create_task(sub())
137+
await asyncio.sleep(0.01, loop=self.loop)
137138

138139
task = self.loop.create_task(main())
139140
self.loop.run_until_complete(task)

0 commit comments

Comments
 (0)