MCPcopy
hub / github.com/psycopg/psycopg / test_as_string_context

Function test_as_string_context

tests/test_sql.py:644–647  ·  view source on GitHub ↗
(conn)

Source from the content-addressed store, hash-verified

642
643
644def test_as_string_context(conn):
645 conn.adapters.register_dumper(str, make_dumper("1"))
646 query = sql.as_string(sql.SQL("select {}").format("foo"), context=conn)
647 assert query == no_e("select 'foo1'")
648
649
650def test_as_string_literal():

Callers

nothing calls this directly

Calls 5

make_dumperFunction · 0.85
no_eFunction · 0.85
register_dumperMethod · 0.80
formatMethod · 0.80
as_stringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…