aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/spec_tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/spec_tests.py b/test/spec_tests.py
index 392049d..11b271c 100755
--- a/test/spec_tests.py
+++ b/test/spec_tests.py
@@ -52,7 +52,7 @@ def do_test(test, normalize, result_counts):
result_counts['pass'] += 1
else:
print_test_header(test['section'], test['example'], test['start_line'], test['end_line'])
- sys.stdout.write(test['markdown'])
+ sys.stdout.buffer.write(test['markdown'].encode('utf-8'))
if unicode_error:
print("Unicode error: " + str(unicode_error))
print("Expected: " + repr(expected_html))
@@ -62,7 +62,7 @@ def do_test(test, normalize, result_counts):
actual_html_lines = actual_html.splitlines(True)
for diffline in unified_diff(expected_html_lines, actual_html_lines,
"expected HTML", "actual HTML"):
- sys.stdout.write(diffline)
+ sys.stdout.buffer.write(diffline.encode('utf-8'))
sys.stdout.write('\n')
result_counts['fail'] += 1
else: