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)
async def test_expires_timeout(): with expires(1): await sleep(2)
async def test_expires_timeout_suppress(): with suppress(TimeoutError): with expires(1): await sleep(2)