MCPcopy Index your code
hub / github.com/python/cpython / test_get_with_putters

Method test_get_with_putters

Lib/test/test_asyncio/test_queues.py:128–139  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

126 self.assertEqual(1, await q.get())
127
128 async def test_get_with_putters(self):
129 loop = asyncio.get_running_loop()
130
131 q = asyncio.Queue(1)
132 await q.put(1)
133
134 waiter = loop.create_future()
135 q._putters.append(waiter)
136
137 self.assertEqual(1, await q.get())
138 self.assertTrue(waiter.done())
139 self.assertIsNone(waiter.result())
140
141 async def test_blocking_get_wait(self):
142 loop = asyncio.get_running_loop()

Callers

nothing calls this directly

Calls 10

putMethod · 0.95
getMethod · 0.95
QueueMethod · 0.80
assertTrueMethod · 0.80
assertIsNoneMethod · 0.80
create_futureMethod · 0.45
appendMethod · 0.45
assertEqualMethod · 0.45
doneMethod · 0.45
resultMethod · 0.45

Tested by

no test coverage detected