Skip to content

Commit 4417478

Browse files
committed
tests: Make tests pass on pyboard.
1 parent 9dcc60d commit 4417478

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

tests/basics/fun-callstar.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ def foo(self, a, b, c):
3131

3232
# Iterator
3333
a.foo(*range(3))
34+
35+
print('flush') # so that it works on pyboard...

tests/basics/fun-defargs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ def fun2(p1, p2=100, p3="foo"):
1818
fun2(1, 2, 3, 4)
1919
except TypeError:
2020
print("TypeError")
21+
22+
print('flush') # so that it works on pyboard...

tests/basics/with1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def __exit__(self, a, b, c):
3838

3939
# These recursive try-finally tests are attempt to get some interpretation
4040
# of last phrase in http://docs.python.org/3.4/library/dis.html#opcode-WITH_CLEANUP
41-
# "If the stack represents an exception, and the function call returns a true
42-
# value, this information is zapped and replaced with a single WHY_SILENCED
41+
# "If the stack represents an exception, and the function call returns a 'true'
42+
# value, this information is "zapped" and replaced with a single WHY_SILENCED
4343
# to prevent END_FINALLY from re-raising the exception. (But non-local gotos
4444
# will still be resumed.)"
4545
print("===")

tests/run-tests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ for test_file in tests:
4949
if test_on_pyboard:
5050
pyb.enter_raw_repl()
5151
try:
52-
if test_file == 'basics/math-fun.py':
52+
if test_file == 'basics/memoryerror.py':
5353
# this test crashes the pyboard
5454
output_mupy = b'CRASH'
5555
else:

0 commit comments

Comments
 (0)