Run tests
Unit tests can be run with pytest:
pip install -e .[test] # Install test requirements
Connect your SEN5x 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 SEN5x on the sensor attached to COM1
Note
The SensorBridge must have default settings (baudrate 460800, address 0)
In order to select tests that do not need an actual SEN5x device, you can use the -m option of pytest:
pytest -m "not needs_device" # Run all tests that do not need an actual SEN5x device