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

Method test_task_done_delay

tornado/test/queues_test.py:340–351  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

338
339 @gen_test
340 def test_task_done_delay(self):
341 # Verify it is task_done(), not get(), that unblocks join().
342 q = self.queue_class() # type: queues.Queue
343 q.put_nowait(0)
344 join = asyncio.ensure_future(q.join())
345 self.assertFalse(join.done())
346 yield q.get()
347 self.assertFalse(join.done())
348 yield gen.moment
349 self.assertFalse(join.done())
350 q.task_done()
351 self.assertTrue(join.done())
352
353 @gen_test
354 def test_join_empty_queue(self):

Callers

nothing calls this directly

Calls 5

put_nowaitMethod · 0.80
joinMethod · 0.80
task_doneMethod · 0.80
doneMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected