MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_format

Method test_format

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

Source from the content-addressed store, hash-verified

87 __dialect__ = "postgresql"
88
89 def test_format(self):
90 seq = Sequence("my_seq_no_schema")
91 dialect = postgresql.dialect()
92 assert (
93 dialect.identifier_preparer.format_sequence(seq)
94 == "my_seq_no_schema"
95 )
96 seq = Sequence("my_seq", schema="some_schema")
97 assert (
98 dialect.identifier_preparer.format_sequence(seq)
99 == "some_schema.my_seq"
100 )
101 seq = Sequence("My_Seq", schema="Some_Schema")
102 assert (
103 dialect.identifier_preparer.format_sequence(seq)
104 == '"Some_Schema"."My_Seq"'
105 )
106
107 @testing.combinations(
108 (None, ""),

Callers

nothing calls this directly

Calls 3

SequenceClass · 0.90
format_sequenceMethod · 0.80
dialectMethod · 0.45

Tested by

no test coverage detected