diff options
Diffstat (limited to 'bin/test.py')
-rwxr-xr-x | bin/test.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/test.py b/bin/test.py index 6ac9942..71c02bd 100755 --- a/bin/test.py +++ b/bin/test.py @@ -60,6 +60,14 @@ class TestStaticModel(unittest.TestCase): self.assertAlmostEqual(static_model('off', 'duration'), 9130, places=0) self.assertAlmostEqual(static_model('setBrightness', 'duration'), 9130, places=0) + param_lut_model = model.get_param_lut() + self.assertAlmostEqual(param_lut_model('OFF', 'power', param=[None, None]), 7124, places=0) + with self.assertRaises(KeyError): + param_lut_model('ON', 'power', param=[None, None]) + param_lut_model('ON', 'power', param=['a']) + param_lut_model('ON', 'power', param=[0]) + self.assertTrue(param_lut_model('ON', 'power', param=[0, 0])) + def test_model_multifile_lm75x(self): testfiles = [ '../data/20170116_124500_LM75x.tar', |