MCPcopy
hub / github.com/psycopg/psycopg / test_as_bytes_literal

Function test_as_bytes_literal

tests/test_sql.py:671–678  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

669
670
671def test_as_bytes_literal():
672 got = sql.as_bytes("query")
673 assert isinstance(got, bytes)
674 assert got == no_e(b"'query'")
675
676 got = sql.as_bytes(dt.date(1970, 1, 1))
677 assert isinstance(got, bytes)
678 assert got == no_e(b"'1970-01-01'::date")
679
680
681class TestValues:

Callers

nothing calls this directly

Calls 2

no_eFunction · 0.85
as_bytesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…