mirror of
https://github.com/logos-co/nomos-specs.git
synced 2025-01-24 06:19:38 +00:00
13 lines
250 B
Python
13 lines
250 B
Python
|
import asyncio
|
||
|
|
||
|
|
||
|
def with_test_timeout(t):
|
||
|
def wrapper(coroutine):
|
||
|
async def run(*args, **kwargs):
|
||
|
async with asyncio.timeout(t):
|
||
|
return await coroutine(*args, **kwargs)
|
||
|
|
||
|
return run
|
||
|
|
||
|
return wrapper
|