MCPcopy
hub / github.com/psycopg/psycopg / test_auto_literal

Method test_auto_literal

tests/test_sql.py:539–543  ·  view source on GitHub ↗
(self, conn)

Source from the content-addressed store, hash-verified

537 assert no_e(obj.as_string(conn)) == "'foo', \"b'ar\""
538
539 def test_auto_literal(self, conn):
540 obj = sql.Composed(["fo'o", dt.date(2020, 1, 1)])
541 obj = obj.join(", ")
542 assert isinstance(obj, sql.Composed)
543 assert no_e(obj.as_string(conn)) == "'fo''o', '2020-01-01'::date"
544
545 def test_sum(self, conn):
546 obj = sql.Composed([sql.SQL("foo ")])

Callers

nothing calls this directly

Calls 3

joinMethod · 0.95
no_eFunction · 0.85
as_stringMethod · 0.45

Tested by

no test coverage detected