MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_distinct_select_modifier

Method test_distinct_select_modifier

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

Source from the content-addressed store, hash-verified

1941 )
1942
1943 def test_distinct_select_modifier(self):
1944 self.assert_compile(
1945 select(table1.c.myid).distinct(),
1946 "SELECT DISTINCT mytable.myid FROM mytable",
1947 )
1948
1949 self.assert_compile(
1950 select(table1.c.myid)
1951 .distinct()
1952 .set_label_style(LABEL_STYLE_TABLENAME_PLUS_COL),
1953 "SELECT DISTINCT mytable.myid AS mytable_myid FROM mytable",
1954 )
1955
1956 @testing.variation("case", ["stringify", "final_froms"])
1957 def test_distinct_expr_no_dep_warning_str_compiler(self, case):

Callers

nothing calls this directly

Calls 4

selectFunction · 0.90
assert_compileMethod · 0.80
distinctMethod · 0.45
set_label_styleMethod · 0.45

Tested by

no test coverage detected