Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
658
def
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
664
def
test_as_bytes_context(conn):
Callers
nothing calls this directly
Calls
3
no_e
Function · 0.85
format
Method · 0.80
as_bytes
Method · 0.45
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…