core/tests/components/modbus
jan iversen 55cdec8c4e
Add test for register configuration for modbus switch (#42604)
* check for false config in modbus tests.

add call to pytest.fail() if device cannot be defined.

* correct bit error in register read.

Only LSB is to be considered for checking ON/OFF

* Add register tests for modbus switch.

Copy the coil tests to work for register tests.

* allow test coverage to control switch.py

With both register and coil test the coverage is a log higher than 50%

* Correct minor bug in handling of register in modbus switch

* Add state_on/state_off test for modbus switch

* restore modbus switch exclusion from coverage

switch file coverage is only at 72%, ideally we want either 80%+ coverage on the file or 90%+ on the component itself which is only about 83% currently with this file included. this is so we keep the overall project coverage in 90%+.

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-11-08 10:42:45 -06:00
..
__init__.py Fix 64-bit modbus sensor register reads (#25672) 2019-08-09 17:03:12 -07:00
conftest.py Add test for register configuration for modbus switch (#42604) 2020-11-08 10:42:45 -06:00
test_modbus_binary_sensor.py Cleanup unused loggers (components N-Z + tests) (#41982) 2020-10-16 21:24:08 -05:00
test_modbus_sensor.py Cleanup unused loggers (components N-Z + tests) (#41982) 2020-10-16 21:24:08 -05:00
test_modbus_switch.py Add test for register configuration for modbus switch (#42604) 2020-11-08 10:42:45 -06:00