MCPcopy
hub / github.com/psycopg/psycopg / test_cant_reenter

Function test_cant_reenter

tests/test_copy_async.py:724–731  ·  view source on GitHub ↗
(aconn)

Source from the content-addressed store, hash-verified

722
723
724async def test_cant_reenter(aconn):
725 cur = aconn.cursor()
726 async with cur.copy("copy (select 1) to stdout") as copy:
727 await alist(copy)
728
729 with pytest.raises(TypeError):
730 async with copy:
731 await alist(copy)
732
733
734async def test_str(aconn):

Callers

nothing calls this directly

Calls 3

alistFunction · 0.85
cursorMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected