Merge pull request #1330 from ogayot/async-timeout
test/api: replace use of deprecated "with timeout()"
This commit is contained in:
commit
2bbe16206c
|
@ -36,7 +36,7 @@ def timeout(multiplier=1):
|
||||||
def wrapper(coro):
|
def wrapper(coro):
|
||||||
@wraps(coro)
|
@wraps(coro)
|
||||||
async def run(*args, **kwargs):
|
async def run(*args, **kwargs):
|
||||||
with async_timeout.timeout(default_timeout * multiplier):
|
async with async_timeout.timeout(default_timeout * multiplier):
|
||||||
return await coro(*args, **kwargs)
|
return await coro(*args, **kwargs)
|
||||||
return run
|
return run
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
Loading…
Reference in New Issue