From 8b0af283f6e32cdaed93154b08dd6fb26973cc45 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Mon, 3 Jan 2011 17:29:04 +0100 Subject: [PATCH] Don't register the unicode typecaster globally during tests It can invalidate the results in further runs in the same process. --- tests/test_quote.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_quote.py b/tests/test_quote.py index 95c5d7a5..7ea6c307 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]