Permalink
Browse files

Add workarounds for PyPy

  • Loading branch information...
Vasiliy Evseenko authored and dvarrazzo committed Dec 26, 2011
1 parent 2a85631 commit 9fb28a7b17bd7c00f90c7c3435e61d29e8334089
@@ -435,9 +435,11 @@ def test_notices(self):
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
@@ -158,10 +158,12 @@ def test_connect_nonnormal_envvar(self):
def test_weakref(self):
from weakref import ref
+ import gc
conn = psycopg2.connect(dsn)
w = ref(conn)
conn.close()
del conn
+ gc.collect()
self.assert_(w() is None)

0 comments on commit 9fb28a7

Please sign in to comment.