Beispiel #1
0
async def test_expires_reset_no_timeout():
    with expires(1) as timeout:
        await sleep(0.5)
        timeout.reset()
        await sleep(0.5)
        timeout.reset()
        await sleep(0.8)
Beispiel #2
0
async def test_expires_timeout():
    with expires(1):
        await sleep(2)
Beispiel #3
0
async def test_expires_timeout_suppress():
    with suppress(TimeoutError):
        with expires(1):
            await sleep(2)