summaryrefslogtreecommitdiff
path: root/tests/test_cursor.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_cursor.py')
-rwxr-xr-xtests/test_cursor.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_cursor.py b/tests/test_cursor.py
index 675699c..47b41e6 100755
--- a/tests/test_cursor.py
+++ b/tests/test_cursor.py
@@ -22,6 +22,8 @@
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
+import gc
+import sys
import time
import ctypes
import pickle
@@ -115,7 +117,6 @@ class CursorTests(ConnectingTestCase):
# more than once from a dict.
cur = self.conn.cursor()
foo = (lambda x: x)('foo') * 10
- import sys
nref1 = sys.getrefcount(foo)
cur.mogrify("select %(foo)s, %(foo)s, %(foo)s", {'foo': foo})
nref2 = sys.getrefcount(foo)
@@ -168,7 +169,6 @@ class CursorTests(ConnectingTestCase):
curs = self.conn.cursor()
w = ref(curs)
del curs
- import gc
gc.collect()
self.assert_(w() is None)