Commit f8b98d83 authored by Daniel Campora's avatar Daniel Campora
Browse files

tests/wipy: Improve UART tests with no pin assignment case.

parent 88ca6c94
......@@ -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'))
......
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment