diff options
| author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-02-23 14:04:27 +0000 |
|---|---|---|
| committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-02-23 14:04:27 +0000 |
| commit | 894d3f653c1a5b9f0269595e665c5f5b7f473cfb (patch) | |
| tree | 7aa137442bb46265afbbc708acdd502b642daa02 /tests/test_quote.py | |
| parent | c01a7edbf46572cf40ccafbf874541219cdb6a9d (diff) | |
| download | psycopg2-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-x | tests/test_quote.py | 4 |
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) |
