]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
add teardown to "run_n_times"
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 7 Oct 2025 18:05:49 +0000 (14:05 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 7 Oct 2025 18:06:06 +0000 (14:06 -0400)
Change-Id: Ibeeb90f7ea3bbd32ffd27b4eb2e2988018e87a5c
(cherry picked from commit 1ad77a925c4d34a6c6c4879803a79e7d6d10881b)

test/aaa_profiling/test_memusage.py

index ebcc41cd2ea445ba34dbd6b6f18dafe9a2e6484f..387a7521d9c81333b590d5fb834f9a88247b0174 100644 (file)
@@ -1844,6 +1844,9 @@ class WeakIdentityMapTest(_fixtures.FixtureTest):
                 fn()
             except Exception as err:
                 error = err
+                with testing.db.begin() as conn:
+                    conn.execute(self.tables.addresses.delete())
+                    conn.execute(self.tables.users.delete())
                 continue
             else:
                 break