MCPcopy
hub / github.com/tornadoweb/tornado / test_wait_timeout

Method test_wait_timeout

tornado/test/locks_test.py:105–110  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

103
104 @gen_test
105 def test_wait_timeout(self):
106 c = locks.Condition()
107 wait = c.wait(timedelta(seconds=0.01))
108 self.io_loop.call_later(0.02, c.notify) # Too late.
109 yield gen.sleep(0.03)
110 self.assertFalse((yield wait))
111
112 @gen_test
113 def test_wait_timeout_preempted(self):

Callers

nothing calls this directly

Calls 2

waitMethod · 0.95
call_laterMethod · 0.80

Tested by

no test coverage detected