MCPcopy
hub / github.com/psycopg/psycopg / test_as_bytes

Function test_as_bytes

tests/test_sql.py:658–661  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

656
657
658def test_as_bytes():
659 query = sql.as_bytes(sql.SQL("select {}").format("foo"))
660 assert isinstance(query, bytes)
661 assert query == no_e(b"select 'foo'")
662
663
664def test_as_bytes_context(conn):

Callers

nothing calls this directly

Calls 3

no_eFunction · 0.85
formatMethod · 0.80
as_bytesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…