From 41736f8201fd645bbcca6741c03eccb8f4c6bde3 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 28 Jun 2014 10:29:12 +0100 Subject: [PATCH] tests: Write output in byte mode, not text mode. This enables testing unicode and non-unicode implementations. --- tests/run-tests | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/run-tests b/tests/run-tests index 8f5f7d470d..c6bc4020d4 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -88,10 +88,10 @@ def run_tests(pyb, tests): rm_f(filename_expected) rm_f(filename_mupy) else: - with open(filename_expected, "w") as f: - f.write(str(output_expected, "ascii")) - with open(filename_mupy, "w") as f: - f.write(str(output_mupy, "ascii")) + with open(filename_expected, "wb") as f: + f.write(output_expected) + with open(filename_mupy, "wb") as f: + f.write(output_mupy) print("FAIL ", test_file) failed_tests.append(test_name)