# HG changeset patch # User stuart # Date 1411167241 21600 # Fri Sep 19 16:54:01 2014 -0600 # Node ID 6af032033c0dabe54657c9075beb6ca0f78bb5e0 # Parent 5a59c723e57fa357ed6cf4a93cacf72e8e15fc7d Fix failing postgresql test: testConcurrentReadCommitted Ignore the "InterfaceError: connection already closed" exception resulting from closing db1 and db2 twice. diff -r 5a59c723e57f -r 6af032033c0d test/test_postgresql.py --- a/test/test_postgresql.py Sat Sep 06 21:53:46 2014 +0200 +++ b/test/test_postgresql.py Fri Sep 19 16:54:01 2014 -0600 @@ -24,6 +24,7 @@ from db_test_base import ClassicInitBase, setupTracker from roundup.backends import get_backend, have_backend +from roundup.backends.back_postgresql import psycopg class postgresqlOpener: if have_backend('postgresql'): @@ -79,8 +80,12 @@ db.close() def tearDown(self): - self.db1.close() - self.db2.close() + try: + self.db1.close() + self.db2.close() + except psycopg.InterfaceError, exc: + if 'connection already closed' in str(exc): pass + else: raise ClassicInitBase.tearDown(self) postgresqlOpener.tearDown(self)