tests: Write output in byte mode, not text mode.

This enables testing unicode and non-unicode implementations.
This commit is contained in:
Damien George 2014-06-28 10:29:12 +01:00
parent e04a44e2f6
commit 41736f8201
1 changed files with 4 additions and 4 deletions

View File

@ -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)