Exemple #1
0
 def test_get_param_raises_KeyError(self, cmdopt_device: str,
                                    cmdopt_baudrate: int):
     hp = HtHeatpump(device=cmdopt_device, baudrate=cmdopt_baudrate)
     with pytest.raises(KeyError):
         hp.get_param("BlaBlaBla")
Exemple #2
0
 def test_in_error(self, hthp: HtHeatpump):
     in_error = hthp.in_error
     assert isinstance(in_error, bool), "'in_error' must be of type bool"
     assert in_error == hthp.get_param("Stoerung")
Exemple #3
0
 def test_get_param(self, hthp: HtHeatpump, name: str, param: HtParam):
     value = hthp.get_param(name)
     assert value is not None, "'value' must not be None"
     assert param.in_limits(value)