async def test_ceil_timeout_round(loop) -> None: async with helpers.ceil_timeout(1.5) as cm: frac, integer = modf(cm.deadline) assert frac == 0
async def test_ceil_timeout_small(loop) -> None: async with helpers.ceil_timeout(1.1) as cm: frac, integer = modf(cm.deadline) # a chance for exact integer with zero fraction is negligible assert frac != 0
async def test_ceil_timeout_none(loop) -> None: async with helpers.ceil_timeout(None) as cm: assert cm.deadline is None
async def test_ceil_timeout_small_with_overriden_threshold(loop) -> None: async with helpers.ceil_timeout(1.5, ceil_threshold=1) as cm: frac, integer = modf(cm.deadline) assert frac == 0