From a2afe796441663c1b94dfdbd39e568a439ee5262 Mon Sep 17 00:00:00 2001 From: Velo Superman Date: Sun, 3 Mar 2013 14:19:23 +0100 Subject: [PATCH] handle encoding properly when outputting diff --- morituri/test/common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/morituri/test/common.py b/morituri/test/common.py index d1aa8d7..97e716e 100644 --- a/morituri/test/common.py +++ b/morituri/test/common.py @@ -26,11 +26,13 @@ def _diff(old, new, desc): raise AssertionError( ("\nError while comparing strings:\n" - "%s") % (output, )) + "%s") % (output.encode('utf-8'), )) def diffStrings(orig, new, desc='input'): + assert type(orig) == type(new) + def _tolines(s): return [line + '\n' for line in s.split('\n')]