From 39bc430e44173430776e7336c9e622d52affe59a Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 20 Dec 2019 16:42:38 +1100 Subject: [PATCH] tests/pyb: Adjust UART and Timer tests to work on PYBD_SF6. --- tests/pyb/timer.py | 2 +- tests/pyb/uart.py | 2 +- tests/pyb/uart.py.exp | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/pyb/timer.py b/tests/pyb/timer.py index e83550abd..0e24ff4ad 100644 --- a/tests/pyb/timer.py +++ b/tests/pyb/timer.py @@ -16,4 +16,4 @@ print(tim.period()) tim = Timer(2, freq=100) print(tim.freq()) tim.freq(0.001) -print(tim.freq()) +print('{:.3f}'.format(tim.freq())) diff --git a/tests/pyb/uart.py b/tests/pyb/uart.py index 82a66dd2e..9dcb1f75c 100644 --- a/tests/pyb/uart.py +++ b/tests/pyb/uart.py @@ -1,7 +1,7 @@ from pyb import UART # test we can correctly create by id -for bus in (-1, 0, 1, 2, 5, 6, 7): +for bus in (-1, 0, 1, 2, 5, 6): try: UART(bus, 9600) print("UART", bus) diff --git a/tests/pyb/uart.py.exp b/tests/pyb/uart.py.exp index 1a4cbd938..70e4ab850 100644 --- a/tests/pyb/uart.py.exp +++ b/tests/pyb/uart.py.exp @@ -4,7 +4,6 @@ UART 1 UART 2 ValueError 5 UART 6 -ValueError 7 UART(1, baudrate=9600, bits=8, parity=None, stop=1, flow=0, timeout=0, timeout_char=3, rxbuf=64) UART(1, baudrate=2400, bits=8, parity=None, stop=1, flow=0, timeout=0, timeout_char=7, rxbuf=64) 0