mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
bpo-32684: Fix nits in tests (GH-7225)
This commit is contained in:
parent
a34e424bdb
commit
6f75bae748
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue