[server/test] import StringIO from io on python3
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 14 Oct 2015 16:30:45 +0200
changeset 10806 bd98cd3b7869
parent 10805 de4403644b1c
child 10807 bb0c7dbd1fe7
[server/test] import StringIO from io on python3 Don't change the import for python2, as we print a mix of unicode and str.
server/test/unittest_checkintegrity.py
--- a/server/test/unittest_checkintegrity.py	Wed Oct 14 16:18:25 2015 +0200
+++ b/server/test/unittest_checkintegrity.py	Wed Oct 14 16:30:45 2015 +0200
@@ -17,7 +17,13 @@
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
 
 import sys
-from StringIO import StringIO
+
+from six import PY2
+if PY2:
+    from StringIO import StringIO
+else:
+    from io import StringIO
+
 from logilab.common.testlib import TestCase, unittest_main
 from cubicweb.devtools import get_test_db_handler, TestServerConfiguration