Unverified Kaydet (Commit) 6f75bae7 authored tarafından Yury Selivanov's avatar Yury Selivanov Kaydeden (comit) GitHub

bpo-32684: Fix nits in tests (GH-7225)

üst a34e424b
...@@ -2131,15 +2131,15 @@ class BaseTaskTests: ...@@ -2131,15 +2131,15 @@ class BaseTaskTests:
time = 0 time = 0
while True: while True:
time += 0.05 time += 0.05
await asyncio.gather(asyncio.sleep(0.05), await asyncio.gather(asyncio.sleep(0.05, loop=loop),
return_exceptions=True, return_exceptions=True,
loop=loop) loop=loop)
if time > 1: if time > 1:
return return
async def main(): async def main():
qwe = asyncio.Task(test()) qwe = self.new_task(loop, test())
await asyncio.sleep(0.2) await asyncio.sleep(0.2, loop=loop)
qwe.cancel() qwe.cancel()
try: try:
await qwe await qwe
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment