summaryrefslogtreecommitdiff
path: root/tests/test_async.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_async.py')
-rwxr-xr-xtests/test_async.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test_async.py b/tests/test_async.py
index 07a3c42..08113c4 100755
--- a/tests/test_async.py
+++ b/tests/test_async.py
@@ -435,9 +435,11 @@ class AsyncTests(unittest.TestCase):
self.assert_(self.conn.notices)
def test_async_cursor_gone(self):
+ import gc
cur = self.conn.cursor()
cur.execute("select 42;");
del cur
+ gc.collect()
self.assertRaises(psycopg2.InterfaceError, self.wait, self.conn)
# The connection is still usable