MCPcopy Create free account
hub / github.com/EasyIME/PIME / test_order

Method test_order

python/python3/tornado/test/queues_test.py:371–382  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

369
370 @gen_test
371 def test_order(self):
372 q = self.queue_class(maxsize=2)
373 q.put_nowait((1, "a"))
374 q.put_nowait((0, "b"))
375 self.assertTrue(q.full())
376 q.put((3, "c"))
377 q.put((2, "d"))
378 self.assertEqual((0, "b"), q.get_nowait())
379 self.assertEqual((1, "a"), (yield q.get()))
380 self.assertEqual((2, "d"), q.get_nowait())
381 self.assertEqual((3, "c"), (yield q.get()))
382 self.assertTrue(q.empty())
383
384
385class LifoQueueJoinTest(QueueJoinTest):

Callers

nothing calls this directly

Calls 6

put_nowaitMethod · 0.80
get_nowaitMethod · 0.80
fullMethod · 0.45
putMethod · 0.45
getMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected