diff options
Diffstat (limited to 'tests/pyb/spi.py')
| -rw-r--r-- | tests/pyb/spi.py | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/tests/pyb/spi.py b/tests/pyb/spi.py index 16b51e7e4..b7a905d78 100644 --- a/tests/pyb/spi.py +++ b/tests/pyb/spi.py @@ -18,6 +18,12 @@ print(spi)  spi.init(SPI.SLAVE, phase=1)  print(spi) +try: +    # need to flush input before we get an error (error is what we want to test) +    for i in range(10): +        spi.recv(1, timeout=100) +except OSError: +    print("OSError")  spi.init(SPI.MASTER)  spi.send(1, timeout=100) | 
