bpo-32684: Fix nits in tests (GH-7225) (#7231) · python/cpython@3ddee64

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