MCPcopy
hub / github.com/psycopg/psycopg / test_percent_escape

Method test_percent_escape

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

Source from the content-addressed store, hash-verified

122 assert s1 == "select foo;"
123
124 def test_percent_escape(self, conn):
125 s = sql.SQL("42 % {0}").format(sql.Literal(7))
126 s1 = s.as_string(conn)
127 assert s1 == "42 % 7"
128
129 def test_braces_escape(self, conn):
130 s = sql.SQL("{{{0}}}").format(sql.Literal(7))

Callers

nothing calls this directly

Calls 2

formatMethod · 0.80
as_stringMethod · 0.45

Tested by

no test coverage detected