From: Oliver Rice Date: Sat, 13 Feb 2021 00:13:17 +0000 (-0600) Subject: test select(.c) in legacy select X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=633ff12af04f9e0d22c6a56b972ad8c2b91d08f3;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git test select(
.c) in legacy select --- 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(