From 0b890e1ccde7da937a25107d9287d4dc4e5b7775 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 9 Feb 2008 01:24:01 +0000 Subject: [PATCH] heisenbug in aisle 3 (when db.dispose is called in unitofwork test with sqlite, the first test that runs in memusage grows by two gc'ed objects on every iteration; then the problem vanishes. doesnt matter what test runs in memusage. doing a dispose() in memusage solves the problem also. screwing wiht the mechanics of engine.dispose() only fix it when both the pool.dispose() *and* the pool.ressurect() are disabled. its just a subtle python/pysqlite bug afaict) --- test/orm/unitofwork.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/orm/unitofwork.py b/test/orm/unitofwork.py index ee696cd9d4..36222472d5 100644 --- a/test/orm/unitofwork.py +++ b/test/orm/unitofwork.py @@ -2024,6 +2024,7 @@ class TransactionTest(ORMTest): # todo: on 8.3 at least, the failed commit seems to close the cursor? # needs investigation. leaving in the DDL above now to help verify # that the new deferrable support on FK isn't involved in this issue. - t1.bind.engine.dispose() + if testing.against('postgres'): + t1.bind.engine.dispose() if __name__ == "__main__": testenv.main() -- 2.47.3