

@skipBefore35
@gen_test
def test_async_for(self):
    q = queues.Queue()
    for i in range(5):
        namespace.put(i)
    namespace = exec_test(globals(), locals(), '\n        async def f():\n            results = []\n            async for i in q:\n                results.append(i)\n                if i == 4:\n                    return results\n        ')
    results = (yield namespace['f']())
    self.assertEqual(results, list(range(5)))

dataset/ETHPy150Open tornadoweb/tornado/tornado/test/queues_test.py QueueGetTest.test_async_for/VarMisuse@34/42 `q`->`namespace`