diff options
author | Daniel Campora <daniel@wipy.io> | 2015-09-07 10:14:27 +0200 |
---|---|---|
committer | Daniel Campora <daniel@wipy.io> | 2015-09-10 07:59:59 +0200 |
commit | f8b98d832962f89ac860834c65d194ed606119ec (patch) | |
tree | d86caea99592ffb95eaa4798c49955e069ea4e31 | |
parent | 88ca6c94d9edab49eb3d7f4a006444800d8c1e6f (diff) | |
download | micropython-f8b98d832962f89ac860834c65d194ed606119ec.tar.gz micropython-f8b98d832962f89ac860834c65d194ed606119ec.zip |
tests/wipy: Improve UART tests with no pin assignment case.
-rw-r--r-- | tests/wipy/uart.py | 11 | ||||
-rw-r--r-- | tests/wipy/uart.py.exp | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/wipy/uart.py b/tests/wipy/uart.py index 82bbe8a38b..a483891ad8 100644 --- a/tests/wipy/uart.py +++ b/tests/wipy/uart.py @@ -76,6 +76,17 @@ print(uart1.read() == b'') print(uart1.write(b'123') == 3) print(uart0.read() == b'123') +Pin('GP13', mode=Pin.IN) +Pin('GP12', mode=Pin.IN) +# no pin assignemnt +uart0 = UART(0, 1000000, pins=None) +print(uart0.write(b'123456789') == 9) +print(uart1.read() == b'') +print(uart1.write(b'123456789') == 9) +print(uart0.read() == b'') +print(Pin.board.GP12) +print(Pin.board.GP13) + # next ones must raise try: UART(0, 9600, parity=2, pins=('GP12', 'GP13', 'GP7')) diff --git a/tests/wipy/uart.py.exp b/tests/wipy/uart.py.exp index ad80a3513a..a5c6da1e8f 100644 --- a/tests/wipy/uart.py.exp +++ b/tests/wipy/uart.py.exp @@ -24,5 +24,11 @@ True True True True +True +True +True +True +Pin('GP12', mode=Pin.IN, pull=Pin.PULL_NONE, drive=Pin.MED_POWER, alt=-1) +Pin('GP13', mode=Pin.IN, pull=Pin.PULL_NONE, drive=Pin.MED_POWER, alt=-1) Exception Exception |