tests: Write output in byte mode, not text mode.
This enables testing unicode and non-unicode implementations.
This commit is contained in:
parent
e04a44e2f6
commit
41736f8201
|
@ -88,10 +88,10 @@ def run_tests(pyb, tests):
|
||||||
rm_f(filename_expected)
|
rm_f(filename_expected)
|
||||||
rm_f(filename_mupy)
|
rm_f(filename_mupy)
|
||||||
else:
|
else:
|
||||||
with open(filename_expected, "w") as f:
|
with open(filename_expected, "wb") as f:
|
||||||
f.write(str(output_expected, "ascii"))
|
f.write(output_expected)
|
||||||
with open(filename_mupy, "w") as f:
|
with open(filename_mupy, "wb") as f:
|
||||||
f.write(str(output_mupy, "ascii"))
|
f.write(output_mupy)
|
||||||
print("FAIL ", test_file)
|
print("FAIL ", test_file)
|
||||||
failed_tests.append(test_name)
|
failed_tests.append(test_name)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue