summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2011-01-03 17:29:04 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2011-01-03 21:34:49 +0100
commit8b0af283f6e32cdaed93154b08dd6fb26973cc45 (patch)
treeb42a8b5fa0c334040bbd323a5d25f41b62c5cb61
parent131c6a25e900029271fca82d454b2dee0deab255 (diff)
downloadpsycopg2-8b0af283f6e32cdaed93154b08dd6fb26973cc45.tar.gz
Don't register the unicode typecaster globally during tests
It can invalidate the results in further runs in the same process.
-rwxr-xr-xtests/test_quote.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_quote.py b/tests/test_quote.py
index 95c5d7a..7ea6c30 100755
--- a/tests/test_quote.py
+++ b/tests/test_quote.py
@@ -71,7 +71,7 @@ class QuotingTestCase(unittest.TestCase):
if not 0xD800 <= u <= 0xDFFF ])) # surrogate area
self.conn.set_client_encoding('UNICODE')
- psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
+ psycopg2.extensions.register_type(psycopg2.extensions.UNICODE, self.conn)
curs.execute("SELECT %s::text;", (data,))
res = curs.fetchone()[0]