# HG changeset patch # User Christophe de Vienne # Date 1416393018 -3600 # Node ID 91a8f355c082ecb870eb201b69fb051cf2834de2 # Parent 335fa90d5ef4935300eedda49f8d1bb6ebaed59a [devtools] Avoid db_cache collisions and mis-loading This is done by stopping to share the db_cache between TestDataBaseHandler instances It may seem overkill, but is the only way I could get it to work properly. I think the whole db caching code needs some rework to better work with different db handlers. Closes #4601328 diff -r 335fa90d5ef4 -r 91a8f355c082 devtools/__init__.py --- a/devtools/__init__.py Mon Oct 06 12:08:41 2014 +0200 +++ b/devtools/__init__.py Wed Nov 19 11:30:18 2014 +0100 @@ -292,6 +292,7 @@ class TestDataBaseHandler(object): DRIVER = None + db_cache = {} explored_glob = set() @@ -535,6 +536,10 @@ class PostgresTestDataBaseHandler(TestDataBaseHandler): DRIVER = 'postgres' + # Separate db_cache for PG databases, to avoid collisions with sqlite dbs + db_cache = {} + explored_glob = set() + __CTL = set() @classmethod