Changeset: 7e26417c92b6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7e26417c92b6
Modified Files:
clients/python3/test/dbapi20.py
Branch: Feb2013
Log Message:
(re-)activate utf8 test also with Python3
diffs (24 lines):
diff --git a/clients/python3/test/dbapi20.py b/clients/python3/test/dbapi20.py
--- a/clients/python3/test/dbapi20.py
+++ b/clients/python3/test/dbapi20.py
@@ -878,6 +878,20 @@ class DatabaseAPI20Test(unittest.TestCas
self.assertTrue(hasattr(self.driver,'ROWID'),
'module.ROWID must be defined.'
)
+ def test_utf8(self):
+ con = self._connect()
+ try:
+ cur = con.cursor()
+ self.executeDDL1(cur)
+ args = {'beer': '\xc4\xa5'}
+ cur.execute( 'insert into %sbooze values (%%(beer)s)' %
self.table_prefix, args )
+ cur.execute('select name from %sbooze' % self.table_prefix)
+ res = cur.fetchall()
+ beer = res[0][0]
+ self.assertEqual(beer,args['beer'],'incorrect data retrieved')
+ finally:
+ con.close()
+
def test_unicode(self):
con = self._connect()
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list