From: Gord Thompson Date: Wed, 25 Jan 2023 18:22:22 +0000 (-0700) Subject: Rename teardown() method to avoid PytestRemovedIn8Warning X-Git-Tag: rel_1_9_3~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08266a49db1ce69224e62fa89f34f03a2f0f9529;p=thirdparty%2Fsqlalchemy%2Falembic.git Rename teardown() method to avoid PytestRemovedIn8Warning pytest 7.2.1 issuing PytestRemovedIn8Warning [method name] is using nose-specific method: `teardown(self)` To remove this warning, rename it to `teardown_method(self)` Change-Id: I0674aaec2fe174ec16bedba7d524bc20fce6d219 --- diff --git a/alembic/testing/suite/test_environment.py b/alembic/testing/suite/test_environment.py index 6c1009ec..8c86859a 100644 --- a/alembic/testing/suite/test_environment.py +++ b/alembic/testing/suite/test_environment.py @@ -33,7 +33,7 @@ class MigrationTransactionTest(TestBase): ) return self.context - def teardown(self): + def teardown_method(self): if self.conn: self.conn.close()