Closed JosephMart closed 6 years ago
There are 2 possibilities to test for:
Is this what you are looking for?
import asyncio
from pymata_aio.pymata3 import PyMata3
def test_connection():
try:
board = PyMata3()
# Board not plugged in - correct sketch or not
except TypeError:
assert False
# incorrect sketch loaded
except asyncio.futures.CancelledError:
assert False
Yep this is what I wanted. Thanks!
How do you suggest that I create a unit test for validation a proper connection to an Arduino board?