summaryrefslogtreecommitdiff
path: root/tests/test_extras_dictcursor.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_extras_dictcursor.py')
-rwxr-xr-xtests/test_extras_dictcursor.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_extras_dictcursor.py b/tests/test_extras_dictcursor.py
index 99bdeee..2a46fba 100755
--- a/tests/test_extras_dictcursor.py
+++ b/tests/test_extras_dictcursor.py
@@ -19,7 +19,7 @@ from datetime import timedelta
import psycopg2
import psycopg2.extras
import unittest
-from .testutils import ConnectingTestCase, skip_before_postgres
+from .testutils import ConnectingTestCase, skip_before_postgres, skip_before_python
class ExtrasDictCursorTests(ConnectingTestCase):
@@ -357,6 +357,13 @@ class NamedTupleCursorTest(ConnectingTestCase):
self.assertEqual(rv.f_column_, 2)
self.assertEqual(rv.f3, 3)
+ @skip_before_python(3)
+ def test_nonascii_name(self):
+ curs = self.conn.cursor()
+ curs.execute('select 1 as \xe5h\xe9')
+ rv = curs.fetchone()
+ self.assertEqual(getattr(rv, '\xe5h\xe9'), 1)
+
def test_minimal_generation(self):
# Instrument the class to verify it gets called the minimum number of times.
from psycopg2.extras import NamedTupleCursor