From f11b221a359f401d47e3b10f1713cfffd90d1c0e Mon Sep 17 00:00:00 2001 From: Gord Thompson Date: Mon, 5 Jul 2021 11:17:13 -0600 Subject: [PATCH] Modernize tests - union Change-Id: I2ccb714a249350f23e2b5f78f5f9ffb0d4f7efb0 --- lib/sqlalchemy/testing/warnings.py | 1 - test/dialect/mssql/test_compiler.py | 2 +- test/sql/test_query.py | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/sqlalchemy/testing/warnings.py b/lib/sqlalchemy/testing/warnings.py index fea8a6f0a5..f8d6296a0c 100644 --- a/lib/sqlalchemy/testing/warnings.py +++ b/lib/sqlalchemy/testing/warnings.py @@ -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 " diff --git a/test/dialect/mssql/test_compiler.py b/test/dialect/mssql/test_compiler.py index 2e4a087131..f1f849bf95 100644 --- a/test/dialect/mssql/test_compiler.py +++ b/test/dialect/mssql/test_compiler.py @@ -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 " diff --git a/test/sql/test_query.py b/test/sql/test_query.py index b3d728ab36..005693402d 100644 --- a/test/sql/test_query.py +++ b/test/sql/test_query.py @@ -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"), -- 2.47.2