Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r89206:4ac343e8285f
Date: 2016-12-20 15:45 +0100
http://bitbucket.org/pypy/pypy/changeset/4ac343e8285f/

Log:    Maybe temporary: change py.test, which displays unicode strings 'xx'
        instead of u'xx'. It's very annoying when the difference is
        essential, like in the py3.5-newtext branch.

diff --git a/py/_io/saferepr.py b/py/_io/saferepr.py
--- a/py/_io/saferepr.py
+++ b/py/_io/saferepr.py
@@ -16,11 +16,11 @@
         # Strictly speaking wrong on narrow builds
         def repr(u):
             if "'" not in u:
-                return py.builtin._totext("'%s'") % u
+                return py.builtin._totext("u'%s'") % u
             elif '"' not in u:
-                return py.builtin._totext('"%s"') % u
+                return py.builtin._totext('u"%s"') % u
             else:
-                return py.builtin._totext("'%s'") % u.replace("'", r"\'")
+                return py.builtin._totext("u'%s'") % u.replace("'", r"\'")
         s = repr(x[:self.maxstring])
         if len(s) > self.maxstring:
             i = max(0, (self.maxstring-3)//2)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to