diff options
Diffstat (limited to 'test/dialect/mysql/test_deprecations.py')
| -rw-r--r-- | test/dialect/mysql/test_deprecations.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/dialect/mysql/test_deprecations.py b/test/dialect/mysql/test_deprecations.py index 544284a21..b2bd99d82 100644 --- a/test/dialect/mysql/test_deprecations.py +++ b/test/dialect/mysql/test_deprecations.py @@ -1,9 +1,29 @@ +from sqlalchemy import select +from sqlalchemy import table +from sqlalchemy.dialects.mysql import base as mysql from sqlalchemy.dialects.mysql import ENUM from sqlalchemy.dialects.mysql import SET +from sqlalchemy.testing import AssertsCompiledSQL +from sqlalchemy.testing import expect_deprecated from sqlalchemy.testing import expect_deprecated_20 from sqlalchemy.testing import fixtures +class CompileTest(AssertsCompiledSQL, fixtures.TestBase): + + __dialect__ = mysql.dialect() + + def test_distinct_string(self): + s = select(["*"]).select_from(table("foo")) + s._distinct = "foo" + + with expect_deprecated( + "Sending string values for 'distinct' is deprecated in the MySQL " + "dialect and will be removed in a future release" + ): + self.assert_compile(s, "SELECT FOO * FROM foo") + + class DeprecateQuoting(fixtures.TestBase): def test_enum_warning(self): ENUM("a", "b") |
