summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2017-12-03 18:47:19 -0800
committerJon Dufresne <jon.dufresne@gmail.com>2017-12-10 10:51:07 -0800
commitc86e682153f4cb8d99e490b2af964f3f11e3489f (patch)
tree33249d9a350210ac861a92e387dff170654f3287 /tests
parent1a8e992fcc87b2d15911b60cc9220ec50a70a4ff (diff)
downloadpsycopg2-c86e682153f4cb8d99e490b2af964f3f11e3489f.tar.gz
Skip register_hstore(..., unicode=True) tests on Python 3
Per the functions documentation, this argument is not supported on Python 3. Skip it during tests. > :param unicode: if `!True`, keys and values returned from the database > will be `!unicode` instead of `!str`. The option is not available on > Python 3 Work towards moving tests outside of the installed package.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_types_extras.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_types_extras.py b/tests/test_types_extras.py
index 8901bab..abe0610 100755
--- a/tests/test_types_extras.py
+++ b/tests/test_types_extras.py
@@ -24,7 +24,8 @@ from pickle import dumps, loads
import unittest
from .testutils import (skip_if_no_uuid, skip_before_postgres,
- ConnectingTestCase, decorate_all_tests, py3_raises_typeerror, slow)
+ ConnectingTestCase, decorate_all_tests, py3_raises_typeerror, slow,
+ skip_from_python)
import psycopg2
import psycopg2.extras
@@ -250,6 +251,7 @@ class HstoreTestCase(ConnectingTestCase):
self.assertEqual(t[2], {'a': 'b'})
@skip_if_no_hstore
+ @skip_from_python(3)
def test_register_unicode(self):
from psycopg2.extras import register_hstore
@@ -318,6 +320,7 @@ class HstoreTestCase(ConnectingTestCase):
ok(dict(zip(ab, ab)))
@skip_if_no_hstore
+ @skip_from_python(3)
def test_roundtrip_unicode(self):
from psycopg2.extras import register_hstore
register_hstore(self.conn, unicode=True)