Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests/test_modbusrtudriver: mock serial instead of relying on port=None
Since minimalmodbus 2.1.0, minimalmodbus.Instrument() [1] no longer accepts port=None. Accepting this was never documented. The idea was that port=None would be passed to serial.Serial(port=None), which explicitly allows this [2]. Now that this is no longer allowed, stick to the original port="/dev/tty0" in the test and mock serial.Serial, so it is not actually opened. [1] https://minimalmodbus.readthedocs.io/en/stable/apiminimalmodbus.html#minimalmodbus.Instrument [2] https://pyserial.readthedocs.io/en/latest/pyserial_api.html#serial.Serial Signed-off-by: Bastian Krause <[email protected]>
- Loading branch information