Run tests

Unit tests can be run with pytest:

pip install -e .[test]                       # Install requirements

We provide a mock implementation that allows you to execute the tests for SFM-SF06 without hardware.

pytest                                       # Run all tests for SFM-SF06 using a driver mock

To use the real hardware you have to connect your SFM-SF06 sensor to a SensorBridge on port 1. Assuming the SensorBridge is attached to COM1 you can start the tests with the following command:

pytest --serial-port=COM1                    # Run all tests for SFM-SF06 on the sensor attached to COM1

Note

The SensorBridge must have default settings (baudrate 460800, address 0)