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

Method test_union_label

test/sql/test_text.py:1079–1086  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1077 )
1078
1079 def test_union_label(self):
1080 s1 = select(func.foo("hoho").label("x"))
1081 s2 = select(func.foo("Bar").label("y"))
1082 stmt = union(s1, s2).order_by("x")
1083 self.assert_compile(
1084 stmt,
1085 "SELECT foo(:foo_1) AS x UNION SELECT foo(:foo_2) AS y ORDER BY x",
1086 )
1087
1088 def test_standalone_units_stringable(self):
1089 self.assert_compile(desc("somelabel"), "somelabel DESC")

Callers

nothing calls this directly

Calls 6

selectFunction · 0.90
unionFunction · 0.90
assert_compileMethod · 0.80
labelMethod · 0.45
fooMethod · 0.45
order_byMethod · 0.45

Tested by

no test coverage detected