From 633ff12af04f9e0d22c6a56b972ad8c2b91d08f3 Mon Sep 17 00:00:00 2001 From: Oliver Rice Date: Fri, 12 Feb 2021 18:13:17 -0600 Subject: [PATCH] test select(.c) in legacy select --- test/sql/test_deprecations.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/sql/test_deprecations.py b/test/sql/test_deprecations.py index ea354ddd7e..3a6da1d13d 100644 --- a/test/sql/test_deprecations.py +++ b/test/sql/test_deprecations.py @@ -446,6 +446,16 @@ class SelectableTest(fixtures.TestBase, AssertsCompiledSQL): stmt = select(iter([column("q")])) self.assert_compile(stmt, "SELECT q") + def test_select_immutable_column_collection_argument(self): + t1 = table("t1", column("q")) + + with testing.expect_deprecated_20( + r"The legacy calling style of select\(\) is deprecated " + "and will be removed in SQLAlchemy 2.0" + ): + stmt = select(t1.c) + self.assert_compile(stmt, "SELECT t1.q FROM t1") + def test_select_kw_argument(self): with testing.expect_deprecated_20( -- 2.47.2