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

Method test_event_wait_clear

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

Source from the content-addressed store, hash-verified

232 self.assertTrue(e.is_set())
233
234 def test_event_wait_clear(self):
235 e = locks.Event()
236 f0 = asyncio.ensure_future(e.wait())
237 e.clear()
238 f1 = asyncio.ensure_future(e.wait())
239 e.set()
240 self.assertTrue(f0.done())
241 self.assertTrue(f1.done())
242
243
244class SemaphoreTest(AsyncTestCase):

Callers

nothing calls this directly

Calls 4

waitMethod · 0.95
clearMethod · 0.95
setMethod · 0.95
doneMethod · 0.45

Tested by

no test coverage detected