diff options
author | Daniel Campora <daniel@wipy.io> | 2015-09-08 15:19:24 +0200 |
---|---|---|
committer | Daniel Campora <daniel@wipy.io> | 2015-09-10 08:00:35 +0200 |
commit | 4cc0cd6cab18f9616021e7fda2824a766951817f (patch) | |
tree | b4532e33fb4b6c535217f73d0a89814975c69c13 /tests/wipy/uart.py | |
parent | d936317143994a57b33f590f38bf28d81011ec0b (diff) |
tests/wipy: Additional tests for when the UART is un-initialized.
Diffstat (limited to 'tests/wipy/uart.py')
-rw-r--r-- | tests/wipy/uart.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/tests/wipy/uart.py b/tests/wipy/uart.py index 31a2c3a0a..24c879218 100644 --- a/tests/wipy/uart.py +++ b/tests/wipy/uart.py @@ -1,5 +1,5 @@ ''' -UART test fro the CC3200 based boards. +UART test for the CC3200 based boards. UART0 and UART1 must be connected together for this test to pass. ''' @@ -109,23 +109,28 @@ try: except Exception: print('Exception') -uart0 = UART(0, 1000000) -uart0.deinit() try: uart0.read() except Exception: print('Exception') -uart0 = UART(0, 1000000) -uart0.deinit() try: uart0.write('abc') except Exception: print('Exception') -uart0 = UART(0, 1000000) -uart0.deinit() try: uart0.sendbreak('abc') except Exception: print('Exception') + +for uart_id in uart_id_range: + uart = UART(uart_id, 1000000) + uart.deinit() + # test printing an unitialized uart + print(uart) + # initialize it back and check that it works again + uart.init(115200) + print(uart) + uart.read() + |