

@gen_test
def test_get_timeout(self):
    q = queues.Queue()
    get_timeout = q.get(timeout=timedelta(seconds=0.01))
    get = q.get()
    with self.assertRaises(TimeoutError):
        (yield get_timeout)
    q.put_nowait(0)
    self.assertEqual(0, (yield get))

dataset/ETHPy150Open tornadoweb/tornado/tornado/test/queues_test.py QueueGetTest.test_get_timeout/original