run-tests: string-escape no longer exists in python 3, use unicode_escape
authorAugie Fackler <augie@google.com>
Mon, 13 Apr 2015 15:57:10 -0400
changeset 25047 8c7e938c8146
parent 25046 40b4308d5653
child 25048 6b8ddf896463
run-tests: string-escape no longer exists in python 3, use unicode_escape
tests/run-tests.py
--- 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"):