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

Method test_event_timeout

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

Source from the content-addressed store, hash-verified

217
218 @gen_test
219 def test_event_timeout(self):
220 e = locks.Event()
221 with self.assertRaises(TimeoutError):
222 yield e.wait(timedelta(seconds=0.01))
223
224 # After a timed-out waiter, normal operation works.
225 self.io_loop.add_timeout(timedelta(seconds=0.01), e.set)
226 yield e.wait(timedelta(seconds=1))
227
228 def test_event_set_multiple(self):
229 e = locks.Event()

Callers

nothing calls this directly

Calls 2

waitMethod · 0.95
add_timeoutMethod · 0.80

Tested by

no test coverage detected