Skip to content

Commit 6f75bae

Browse files
authored
bpo-32684: Fix nits in tests (GH-7225)
1 parent a34e424 commit 6f75bae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/test/test_asyncio/test_tasks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2131,15 +2131,15 @@ async def test():
21312131
time = 0
21322132
while True:
21332133
time += 0.05
2134-
await asyncio.gather(asyncio.sleep(0.05),
2134+
await asyncio.gather(asyncio.sleep(0.05, loop=loop),
21352135
return_exceptions=True,
21362136
loop=loop)
21372137
if time > 1:
21382138
return
21392139

21402140
async def main():
2141-
qwe = asyncio.Task(test())
2142-
await asyncio.sleep(0.2)
2141+
qwe = self.new_task(loop, test())
2142+
await asyncio.sleep(0.2, loop=loop)
21432143
qwe.cancel()
21442144
try:
21452145
await qwe

0 commit comments

Comments
 (0)