From: Mike Bayer Date: Sat, 9 Feb 2008 01:24:01 +0000 (+0000) Subject: heisenbug in aisle 3 X-Git-Tag: rel_0_4_3~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b890e1ccde7da937a25107d9287d4dc4e5b7775;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git 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) --- 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()