summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/pyb/uart.py8
-rw-r--r--tests/pyb/uart.py.exp8
2 files changed, 11 insertions, 5 deletions
diff --git a/tests/pyb/uart.py b/tests/pyb/uart.py
index 6e0118d155..288022fea4 100644
--- a/tests/pyb/uart.py
+++ b/tests/pyb/uart.py
@@ -2,11 +2,13 @@ from pyb import UART
uart = UART(1)
uart = UART(1, 9600)
-uart = UART(1, 9600, bits=8, stop=1, parity=None)
+uart = UART(1, 9600, bits=8, parity=None, stop=1)
print(uart)
uart.init(1200)
print(uart)
-uart.any()
-uart.send(1, timeout=500)
+print(uart.any())
+print(uart.write('123'))
+print(uart.write(b'abcd'))
+print(uart.writechar(1))
diff --git a/tests/pyb/uart.py.exp b/tests/pyb/uart.py.exp
index 58ded4d848..dd98e17968 100644
--- a/tests/pyb/uart.py.exp
+++ b/tests/pyb/uart.py.exp
@@ -1,2 +1,6 @@
-UART(1, baudrate=9600, bits=8, stop=1, parity=None)
-UART(1, baudrate=1200, bits=8, stop=1, parity=None)
+UART(1, baudrate=9600, bits=8, parity=None, stop=1, timeout=1000, timeout_char=0, read_buf_len=64)
+UART(1, baudrate=1200, bits=8, parity=None, stop=1, timeout=1000, timeout_char=0, read_buf_len=64)
+False
+3
+4
+None