diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-01-29 11:44:58 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-01-29 11:44:58 -0500 |
| commit | c59bf0007f0148b73c80a3d6b86d6c66ae0ab422 (patch) | |
| tree | b08546beb64fc526fcee16a32eb2d98d408a902b /test/dialect/postgresql/test_dialect.py | |
| parent | 859379e2fcc4506d036700ba1eca4c0ae526a8ee (diff) | |
| download | sqlalchemy-c59bf0007f0148b73c80a3d6b86d6c66ae0ab422.tar.gz | |
- The ``sqlalchemy.dialects.postgres`` module, long deprecated, is
removed; this has emitted a warning for many years and projects
should be calling upon ``sqlalchemy.dialects.postgresql``.
Engine URLs of the form ``postgres://`` will still continue to function,
however.
Diffstat (limited to 'test/dialect/postgresql/test_dialect.py')
| -rw-r--r-- | test/dialect/postgresql/test_dialect.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_dialect.py b/test/dialect/postgresql/test_dialect.py index 52620bb78..c0e1819d6 100644 --- a/test/dialect/postgresql/test_dialect.py +++ b/test/dialect/postgresql/test_dialect.py @@ -15,6 +15,9 @@ import logging import logging.handlers from sqlalchemy.testing.mock import Mock from sqlalchemy.engine import engine_from_config +from sqlalchemy.engine import url +from sqlalchemy.testing import is_ +from sqlalchemy.testing import expect_deprecated class MiscTest(fixtures.TestBase, AssertsExecutionResults, AssertsCompiledSQL): @@ -79,6 +82,13 @@ class MiscTest(fixtures.TestBase, AssertsExecutionResults, AssertsCompiledSQL): psycopg2.Error) assert isinstance(exception, exc.OperationalError) + def test_deprecated_dialect_name_still_loads(self): + with expect_deprecated( + "The 'postgres' dialect name " + "has been renamed to 'postgresql'"): + dialect = url.URL("postgres").get_dialect() + is_(dialect, postgresql.dialect) + # currently not passing with pg 9.3 that does not seem to generate # any notices here, would rather find a way to mock this @testing.requires.no_coverage |
