MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_format

Method test_format

test/dialect/postgresql/test_compiler.py:95–111  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

93 __dialect__ = "postgresql"
94
95 def test_format(self):
96 seq = Sequence("my_seq_no_schema")
97 dialect = postgresql.dialect()
98 assert (
99 dialect.identifier_preparer.format_sequence(seq)
100 == "my_seq_no_schema"
101 )
102 seq = Sequence("my_seq", schema="some_schema")
103 assert (
104 dialect.identifier_preparer.format_sequence(seq)
105 == "some_schema.my_seq"
106 )
107 seq = Sequence("My_Seq", schema="Some_Schema")
108 assert (
109 dialect.identifier_preparer.format_sequence(seq)
110 == '"Some_Schema"."My_Seq"'
111 )
112
113 @testing.combinations(
114 (None, ""),

Callers

nothing calls this directly

Calls 3

SequenceClass · 0.90
format_sequenceMethod · 0.80
dialectMethod · 0.45

Tested by

no test coverage detected