]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Modernize tests - union
authorGord Thompson <gord@gordthompson.com>
Mon, 5 Jul 2021 17:17:13 +0000 (11:17 -0600)
committerGord Thompson <gord@gordthompson.com>
Mon, 12 Jul 2021 22:44:35 +0000 (16:44 -0600)
Change-Id: I2ccb714a249350f23e2b5f78f5f9ffb0d4f7efb0

lib/sqlalchemy/testing/warnings.py
test/dialect/mssql/test_compiler.py
test/sql/test_query.py

index fea8a6f0a5d5da9f4be656c5c2370de690d69569..f8d6296a0c0dcf3d6857074f27bf649368e49d48 100644 (file)
@@ -68,7 +68,6 @@ def setup_filters():
         #
         # Core SQL constructs
         #
-        r"Set functions such as union\(\), union_all\(\), extract\(\),",
         r"The legacy calling style of select\(\) is deprecated and will be "
         "removed",
         r"The FromClause.select\(\) method will no longer accept keyword "
index 2e4a0871310529339c0a2b43bfa373c99191f4e7..f1f849bf95426e1f0353f5b9430c44db3e728b65 100644 (file)
@@ -805,7 +805,7 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
                 t2.c.col2.in_(["t2col2r2", "t2col2r3"]),
             ),
         )
-        u = union(s1, s2, order_by=["col3", "col4"])
+        u = union(s1, s2).order_by("col3", "col4")
         self.assert_compile(
             u,
             "SELECT t1.col3 AS col3, t1.col4 AS col4 "
index b3d728ab36147ecf58b8741a19c1cc518a1653ef..005693402db099c341897a8db3e14a4ac42adfca 100644 (file)
@@ -1202,7 +1202,7 @@ class CompoundTest(fixtures.TablesTest):
                 t2.c.col2.in_(["t2col2r2", "t2col2r3"]),
             ),
         )
-        u = union(s1, s2, order_by=["col3", "col4"])
+        u = union(s1, s2).order_by("col3", "col4")
 
         wanted = [
             ("aaa", "aaa"),
@@ -1225,7 +1225,7 @@ class CompoundTest(fixtures.TablesTest):
                 t2.c.col2.in_(["t2col2r2", "t2col2r3"]),
             ),
         )
-        u = union(s1, s2, order_by=["col3", "col4"])
+        u = union(s1, s2).order_by("col3", "col4")
 
         wanted = [
             ("aaa", "aaa"),