MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_no_group_by_labels

Method test_no_group_by_labels

test/sql/test_compiler.py:1823–1834  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1821 )
1822
1823 def test_no_group_by_labels(self):
1824 lab1 = (table1.c.myid + 12).label("foo")
1825 lab2 = func.somefunc(table1.c.name).label("bar")
1826 dialect = default.DefaultDialect()
1827
1828 self.assert_compile(
1829 select(lab1, lab2).group_by(lab1, lab2),
1830 "SELECT mytable.myid + :myid_1 AS foo, somefunc(mytable.name) "
1831 "AS bar FROM mytable GROUP BY mytable.myid + :myid_1, "
1832 "somefunc(mytable.name)",
1833 dialect=dialect,
1834 )
1835
1836 def test_conjunctions(self):
1837 a, b, c = text("a"), text("b"), text("c")

Callers

nothing calls this directly

Calls 5

selectFunction · 0.90
somefuncMethod · 0.80
assert_compileMethod · 0.80
labelMethod · 0.45
group_byMethod · 0.45

Tested by

no test coverage detected