(conn_cls, dsn)
| 859 | |
| 860 | |
| 861 | def test_connect_context_adapters(conn_cls, dsn): |
| 862 | ctx = psycopg.adapt.AdaptersMap(psycopg.adapters) |
| 863 | ctx.register_dumper(str, make_bin_dumper("b")) |
| 864 | ctx.register_dumper(str, make_dumper("t")) |
| 865 | |
| 866 | conn = conn_cls.connect(dsn, context=ctx) |
| 867 | |
| 868 | cur = conn.execute("select %s", ["hello"]) |
| 869 | assert cur.fetchone()[0] == "hellot" |
| 870 | cur = conn.execute("select %b", ["hello"]) |
| 871 | assert cur.fetchone()[0] == "hellob" |
| 872 | conn.close() |
| 873 | |
| 874 | |
| 875 | def test_connect_context_copy(conn_cls, dsn, conn): |
nothing calls this directly
no test coverage detected
searching dependent graphs…