MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / test_labeled_subquery_twice

Method test_labeled_subquery_twice

test/sql/test_selectable.py:287–303  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

285 )
286
287 def test_labeled_subquery_twice(self):
288 scalar_select = select(table1.c.col1).label("foo")
289
290 s1 = select(scalar_select).subquery()
291 s2 = select(scalar_select, scalar_select).subquery()
292
293 eq_(
294 s1.c.foo.proxy_set,
295 {s1.c.foo, scalar_select, scalar_select.element},
296 )
297 eq_(
298 s2.c.foo.proxy_set,
299 {s2.c.foo, scalar_select, scalar_select.element},
300 )
301
302 assert s1.corresponding_column(scalar_select) is s1.c.foo
303 assert s2.corresponding_column(scalar_select) is s2.c.foo
304
305 def test_labels_name_w_separate_key(self):
306 label = select(table1.c.col1).label("foo")

Callers

nothing calls this directly

Calls 5

selectFunction · 0.90
eq_Function · 0.90
labelMethod · 0.45
subqueryMethod · 0.45
corresponding_columnMethod · 0.45

Tested by

no test coverage detected