[devtools/test] firstnames.txt is in latin1
authorJulien Cristau <julien.cristau@logilab.fr>
Mon, 05 Oct 2015 16:59:18 +0200
changeset 10773 5b051dd4a4f5
parent 10772 2ff5afce3216
child 10774 0361442e2633
[devtools/test] firstnames.txt is in latin1
devtools/test/unittest_dbfill.py
--- a/devtools/test/unittest_dbfill.py	Mon Oct 05 16:54:12 2015 +0200
+++ b/devtools/test/unittest_dbfill.py	Mon Oct 05 16:59:18 2015 +0200
@@ -21,6 +21,7 @@
 import os.path as osp
 import re
 import datetime
+import io
 
 from six.moves import range
 
@@ -52,7 +53,7 @@
             return None
 
     def _available_Person_firstname(self, etype, attrname):
-        return [f.strip() for f in open(osp.join(DATADIR, 'firstnames.txt'))]
+        return [f.strip() for f in io.open(osp.join(DATADIR, 'firstnames.txt'), encoding='latin1')]
 
     def setUp(self):
         config = ApptestConfiguration('data', apphome=DATADIR)