summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-06-28 10:29:12 +0100
committerDamien George <damien.p.george@gmail.com>2014-06-28 10:29:12 +0100
commit41736f8201fd645bbcca6741c03eccb8f4c6bde3 (patch)
tree051ce8b37255a4ab525a07517962538f151944e5
parente04a44e2f65d1ac49e5cce164d6010ff968f4d48 (diff)
downloadmicropython-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-xtests/run-tests8
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)