diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-12-26 22:35:33 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-12-26 22:35:33 +0100 |
commit | 702ae0a904a4a0974ce48dc575aff38ef568f070 (patch) | |
tree | 44c1a4433e395ed934d665401cab86b36aca7dfe /tests/test_async.py | |
parent | ede0e145dd895cddc613bc642c3e22b07ed26b4b (diff) | |
download | psycopg2-702ae0a904a4a0974ce48dc575aff38ef568f070.tar.gz |
Force GC during weakref tests
Required to run the tests under PyPy with no refcount. See
https://github.com/mvantellingen/psycopg2-ctypes/pull/15#issuecomment-3274618
Diffstat (limited to 'tests/test_async.py')
-rwxr-xr-x | tests/test_async.py | 2 |
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 |