changeset 25047:8c7e938c8146

run-tests: string-escape no longer exists in python 3, use unicode_escape
author Augie Fackler <augie@google.com>
date Mon, 13 Apr 2015 15:57:10 -0400
parents 40b4308d5653
children 6b8ddf896463
files tests/run-tests.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Mon Apr 13 15:55:48 2015 -0400
+++ b/tests/run-tests.py	Mon Apr 13 15:57:10 2015 -0400
@@ -1120,9 +1120,11 @@
             return True
         if el:
             if el.endswith(b" (esc)\n"):
-                el = el[:-7].decode('string-escape') + '\n'
                 if sys.version_info[0] == 3:
-                    el.encode('utf-8')
+                    el = el[:-7].decode('unicode_escape') + '\n'
+                    el = el.encode('utf-8')
+                else:
+                    el = el[:-7].decode('string-escape') + '\n'
             if el == l or os.name == 'nt' and el[:-1] + b'\r\n' == l:
                 return True
             if el.endswith(b" (re)\n"):