diff options
author | Damien George <damien.p.george@gmail.com> | 2014-06-28 10:29:12 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-06-28 10:29:12 +0100 |
commit | 41736f8201fd645bbcca6741c03eccb8f4c6bde3 (patch) | |
tree | 051ce8b37255a4ab525a07517962538f151944e5 | |
parent | e04a44e2f65d1ac49e5cce164d6010ff968f4d48 (diff) | |
download | micropython-41736f8201fd645bbcca6741c03eccb8f4c6bde3.tar.gz micropython-41736f8201fd645bbcca6741c03eccb8f4c6bde3.zip |
tests: Write output in byte mode, not text mode.
This enables testing unicode and non-unicode implementations.
-rwxr-xr-x | tests/run-tests | 8 |
1 files 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) |