changeset 33949:7cab956794e4

run-tests: pass unicode to Pygments This is required on Python 3, and is more correct on Python 2 because Pygments is a unicode library.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 24 Aug 2017 22:20:02 +0900
parents f5d4bb8e944d
children 3b2a002ef685
files tests/run-tests.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Thu Aug 24 22:15:40 2017 +0900
+++ b/tests/run-tests.py	Thu Aug 24 22:20:02 2017 +0900
@@ -615,7 +615,8 @@
     if not color:
         return line
     assert pygmentspresent
-    return pygments.highlight(line, difflexer, terminal256formatter)
+    return pygments.highlight(line.decode('latin1'), difflexer,
+                              terminal256formatter).encode('latin1')
 
 def highlightmsg(msg, color):
     if not color: