MCPcopy
hub / github.com/psycopg/psycopg / test_pos

Method test_pos

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

Source from the content-addressed store, hash-verified

81
82class TestSqlFormat:
83 def test_pos(self, conn):
84 s = sql.SQL("select {} from {}").format(
85 sql.Identifier("field"), sql.Identifier("table")
86 )
87 s1 = s.as_string(conn)
88 assert isinstance(s1, str)
89 assert s1 == 'select "field" from "table"'
90
91 def test_pos_spec(self, conn):
92 s = sql.SQL("select {0} from {1}").format(

Callers

nothing calls this directly

Calls 2

formatMethod · 0.80
as_stringMethod · 0.45

Tested by

no test coverage detected