MCPcopy
hub / github.com/nonebot/nonebot2 / test_timeout_unset_vs_none

Function test_timeout_unset_vs_none

tests/test_driver.py:710–728  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

708
709
710def test_timeout_unset_vs_none():
711 # default: all fields are UNSET
712 t = Timeout()
713 assert t.total is UNSET
714 assert t.connect is UNSET
715 assert t.read is UNSET
716 assert t.close is UNSET
717
718 # explicitly set to None
719 t = Timeout(close=None)
720 assert t.close is None
721 assert t.close is not UNSET
722
723 # explicitly set to a value
724 t = Timeout(total=5.0, close=None)
725 assert t.total == 5.0
726 assert t.close is None
727 assert t.connect is UNSET
728 assert t.read is UNSET
729
730
731@pytest.mark.anyio

Callers

nothing calls this directly

Calls 1

TimeoutClass · 0.85

Tested by

no test coverage detected