diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-01-08 17:46:55 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-01-11 22:09:53 -0500 |
| commit | a6094d6682c956ce8a77fbec2a2700f901f3e75e (patch) | |
| tree | 39b9e21f3bf0270cf8fe11dbc6fabb73c9cb5f14 /test/engine | |
| parent | 1e278de4cc9a4181e0747640a960e80efcea1ca9 (diff) | |
| download | sqlalchemy-a6094d6682c956ce8a77fbec2a2700f901f3e75e.tar.gz | |
use ..deprecated directive w/ version in all cases
These changes should be ported from 1.3 back to 1.0 or
possibly 0.9 to the extent they are relevant in each
version. In 1.3 we hope to turn all deprecation documentation
into warnings.
Change-Id: I205186cde161af9389af513a425c62ce90dd54d8
Diffstat (limited to 'test/engine')
| -rw-r--r-- | test/engine/test_ddlevents.py | 6 | ||||
| -rw-r--r-- | test/engine/test_pool.py | 10 | ||||
| -rw-r--r-- | test/engine/test_transaction.py | 4 |
3 files changed, 13 insertions, 7 deletions
diff --git a/test/engine/test_ddlevents.py b/test/engine/test_ddlevents.py index 562ed4d68..2762eaa7e 100644 --- a/test/engine/test_ddlevents.py +++ b/test/engine/test_ddlevents.py @@ -444,7 +444,7 @@ class DDLExecutionTest(fixtures.TestBase): assert "xyzzy" in strings assert "fnord" in strings - @testing.uses_deprecated(r"See DDLEvents") + @testing.uses_deprecated(r".*use the DDLEvents") def test_table_by_metadata_deprecated(self): metadata, users, engine = self.metadata, self.users, self.engine DDL("mxyzptlk").execute_at("before-create", users) @@ -548,7 +548,7 @@ class DDLExecutionTest(fixtures.TestBase): assert "xyzzy" in strings assert "fnord" in strings - @testing.uses_deprecated(r"See DDLEvents") + @testing.uses_deprecated(r".*use the DDLEvents") def test_metadata_deprecated(self): metadata, engine = self.metadata, self.engine @@ -607,7 +607,7 @@ class DDLExecutionTest(fixtures.TestBase): strings = " ".join(str(x) for x in pg_mock.mock) assert "my_test_constraint" in strings - @testing.uses_deprecated(r"See DDLEvents") + @testing.uses_deprecated(r".*use the DDLEvents") def test_conditional_constraint_deprecated(self): metadata, users, engine = self.metadata, self.users, self.engine nonpg_mock = engines.mock_engine(dialect_name="sqlite") diff --git a/test/engine/test_pool.py b/test/engine/test_pool.py index 02eb5fc54..75caa233a 100644 --- a/test/engine/test_pool.py +++ b/test/engine/test_pool.py @@ -824,7 +824,10 @@ class PoolFirstConnectSyncTest(PoolTestBase): class DeprecatedPoolListenerTest(PoolTestBase): @testing.requires.predictable_gc - @testing.uses_deprecated(r".*Use event.listen") + @testing.uses_deprecated( + r".*Use the PoolEvents", + r".*'listeners' argument .* is deprecated" + ) def test_listeners(self): class InstrumentingListener(object): def __init__(self): @@ -1009,7 +1012,10 @@ class DeprecatedPoolListenerTest(PoolTestBase): c.close() snoop.assert_total(1, 1, 2, 2) - @testing.uses_deprecated(r".*Use event.listen") + @testing.uses_deprecated( + r".*Use the PoolEvents", + r".*'listeners' argument .* is deprecated" + ) def test_listeners_callables(self): def connect(dbapi_con, con_record): counts[0] += 1 diff --git a/test/engine/test_transaction.py b/test/engine/test_transaction.py index 136468329..d8161a29a 100644 --- a/test/engine/test_transaction.py +++ b/test/engine/test_transaction.py @@ -823,8 +823,8 @@ class ExplicitAutoCommitTest(fixtures.TestBase): conn2.close() @testing.uses_deprecated( - r"autocommit on select\(\) is deprecated", - r"``autocommit\(\)`` is deprecated", + r".*select.autocommit parameter is deprecated", + r".*SelectBase.autocommit\(\) .* is deprecated", ) def test_explicit_compiled_deprecated(self): conn1 = testing.db.connect() |
