

@gen_test
def test_put_timeout(self):
    q = queues.Queue(1)
    q.put_nowait(0)
    put_timeout = q.put(1, timeout=timedelta(seconds=0.01))
    put = q.put(2)
    with self.assertRaises(TimeoutError):
        (yield put_timeout)
    self.assertEqual(0, self.get_nowait())
    self.assertEqual(2, (yield q.get()))
    (yield put)

dataset/ETHPy150Open tornadoweb/tornado/tornado/test/queues_test.py QueuePutTest.test_put_timeout/VarMisuse@78/92 `q`->`self`