(aconn_cls, dsn)
| 876 | |
| 877 | |
| 878 | async def test_connect_context_adapters(aconn_cls, dsn): |
| 879 | ctx = psycopg.adapt.AdaptersMap(psycopg.adapters) |
| 880 | ctx.register_dumper(str, make_bin_dumper("b")) |
| 881 | ctx.register_dumper(str, make_dumper("t")) |
| 882 | |
| 883 | conn = await aconn_cls.connect(dsn, context=ctx) |
| 884 | |
| 885 | cur = await conn.execute("select %s", ["hello"]) |
| 886 | assert (await cur.fetchone())[0] == "hellot" |
| 887 | cur = await conn.execute("select %b", ["hello"]) |
| 888 | assert (await cur.fetchone())[0] == "hellob" |
| 889 | await conn.close() |
| 890 | |
| 891 | |
| 892 | async def test_connect_context_copy(aconn_cls, dsn, aconn): |
nothing calls this directly
no test coverage detected
searching dependent graphs…