MCPcopy Index your code
hub / github.com/python-websockets/websockets / test_timeout_pending

Method test_timeout_pending

tests/sync/test_utils.py:9–14  ·  view source on GitHub ↗

timeout returns remaining time if deadline is in the future.

(self)

Source from the content-addressed store, hash-verified

7
8class DeadlineTests(unittest.TestCase):
9 def test_timeout_pending(self):
10 """timeout returns remaining time if deadline is in the future."""
11 deadline = Deadline(MS)
12 timeout = deadline.timeout()
13 self.assertGreater(timeout, 0)
14 self.assertLess(timeout, MS)
15
16 def test_timeout_elapsed_exception(self):
17 """timeout raises TimeoutError if deadline is in the past."""

Callers

nothing calls this directly

Calls 2

timeoutMethod · 0.95
DeadlineClass · 0.85

Tested by

no test coverage detected