Skip to content

Commit 5f3a259

Browse files
committed
Sync with micropython. closes adafruit#1414
1 parent 5e4b3a8 commit 5f3a259

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tools/tinytest-codegen.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def chew_filename(t):
2323

2424
def script_to_map(test_file):
2525
r = {"name": chew_filename(test_file)["func"]}
26-
with open(t) as test:
26+
with open(test_file, "rb") as test:
2727
script = test.readlines()
2828

2929
# Test for import skip_if and inject it into the test as needed.
@@ -39,7 +39,11 @@ def script_to_map(test_file):
3939
continue
4040
script.insert(index + total_lines, "\t" + line)
4141
total_lines += 1
42-
r['script'] = escape(''.join(script))
42+
r['script'] = escape(b''.join(script))
43+
44+
with open(test_file + ".exp", "rb") as f:
45+
r["output"] = escape(f.read())
46+
4347
return r
4448

4549
test_function = (

0 commit comments

Comments
 (0)