summaryrefslogtreecommitdiff
path: root/tests/test_quote.py
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2011-02-23 14:04:27 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2011-02-23 14:04:27 +0000
commit894d3f653c1a5b9f0269595e665c5f5b7f473cfb (patch)
tree7aa137442bb46265afbbc708acdd502b642daa02 /tests/test_quote.py
parentc01a7edbf46572cf40ccafbf874541219cdb6a9d (diff)
downloadpsycopg2-894d3f653c1a5b9f0269595e665c5f5b7f473cfb.tar.gz
Raise an exception if the libpq fails to decode bytea in hex format
Diffstat (limited to 'tests/test_quote.py')
-rwxr-xr-xtests/test_quote.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_quote.py b/tests/test_quote.py
index 23bc61f..4ee451f 100755
--- a/tests/test_quote.py
+++ b/tests/test_quote.py
@@ -83,6 +83,10 @@ class QuotingTestCase(unittest.TestCase):
else:
res = curs.fetchone()[0].tobytes()
+ if res[0] in (b('x'), ord(b('x'))) and self.conn.server_version >= 90000:
+ return self.skipTest(
+ "bytea broken with server >= 9.0, libpq < 9")
+
self.assertEqual(res, data)
self.assert_(not self.conn.notices)