diff options
| author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2019-03-16 18:56:56 +0000 |
|---|---|---|
| committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2019-03-16 19:13:58 +0000 |
| commit | b0119fef816daf4f47191359dc3fa609f9783e2c (patch) | |
| tree | 36ea36d69ae88eb09a916029436967c1ff67fbf9 /tests/test_cursor.py | |
| parent | 8cfe176a8501be37a925a364e510b32db43e82cc (diff) | |
| download | psycopg2-b0119fef816daf4f47191359dc3fa609f9783e2c.tar.gz | |
Other import moved to top level in tests
Diffstat (limited to 'tests/test_cursor.py')
| -rwxr-xr-x | tests/test_cursor.py | 4 |
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) |
