pip install -r test_requirements.txt
coverage run setup.py test
To run tests that actually communicate with a device you will need to set the SERIALPORT environment variable to the port where you have an device connected.
Linux
export SERIALPORT=/dev/ttyUSB0