MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / writer

Method writer

tests/test_copy.py:236–240  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

234 async def test_copy_from_query_to_sink(self):
235 with tempfile.NamedTemporaryFile() as f:
236 async def writer(data):
237 # Sleeping here to simulate slow output sink to test
238 # backpressure.
239 await asyncio.sleep(0.05)
240 f.write(data)
241
242 await self.con.copy_from_query('''
243 SELECT

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected