Skip to content

Commit 6936f46

Browse files
committed
tests: Get misc/print_exception and pyb/spi working on pyboard.
1 parent c8b0229 commit 6936f46

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎tests/misc/print_exception.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@
1414
print_exception(e, buf)
1515
s = buf.getvalue()
1616
for l in s.split("\n"):
17+
# uPy on pyboard prints <stdin> as file, so remove filename.
18+
if l.startswith(" File "):
19+
print(l[:8], l[-23:])
1720
# uPy and CPy tracebacks differ in that CPy prints a source line for
1821
# each traceback entry. In this case, we know that offending line
1922
# has 4-space indent, so filter it out.
20-
if not l.startswith(" "):
23+
elif not l.startswith(" "):
2124
print(l)

‎tests/pyb/spi.py.exp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
SPI(1)
2-
SPI(1, SPI.MASTER, baudrate=328125, polarity=1, phase=0, bits=8)
2+
SPI(1, SPI.MASTER, baudrate=328125, prescaler=256, polarity=1, phase=0, bits=8)
33
SPI(1, SPI.SLAVE, polarity=1, phase=1, bits=8)
44
b'\xff'
55
b'\xff'

0 commit comments

Comments
 (0)