summaryrefslogtreecommitdiff
path: root/tests/test_cursor.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2017-12-11 20:08:18 -0800
committerJon Dufresne <jon.dufresne@gmail.com>2017-12-11 20:27:52 -0800
commitbe3b1ba1eb84244e97a9d85ba05ef2ca6b5a213b (patch)
treed436b59e29ff037e37cefa8b7b79f58d3fca101b /tests/test_cursor.py
parent8ad2098b74ee90f341e69937a1503e29decf4594 (diff)
downloadpsycopg2-be3b1ba1eb84244e97a9d85ba05ef2ca6b5a213b.tar.gz
In tests, use compat.py where there is overlap
Diffstat (limited to 'tests/test_cursor.py')
-rwxr-xr-xtests/test_cursor.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_cursor.py b/tests/test_cursor.py
index ec76918..d522386 100755
--- a/tests/test_cursor.py
+++ b/tests/test_cursor.py
@@ -29,9 +29,10 @@ import psycopg2.extensions
import unittest
from .testutils import (ConnectingTestCase, skip_before_postgres,
skip_if_no_getrefcount, slow, skip_if_no_superuser,
- skip_if_windows, unicode)
+ skip_if_windows)
import psycopg2.extras
+from psycopg2.compat import text_type
class CursorTests(ConnectingTestCase):
@@ -75,7 +76,7 @@ class CursorTests(ConnectingTestCase):
snowman = u"\u2603"
def b(s):
- if isinstance(s, unicode):
+ if isinstance(s, text_type):
return s.encode('utf8')
else:
return s