Exemple #1
0
 def test_get_value(self):
     point = gauge.GaugePointDouble()
     point.set(10.1)
     self.assertEqual(point.value, 10.1)
     self.assertEqual(point.get_value(), point.value)
Exemple #2
0
 def test_add(self):
     point = gauge.GaugePointDouble()
     point.add(10)
     self.assertEqual(point.value, 10.0)
     point.add(-20.2)
     self.assertEqual(point.value, -10.2)
Exemple #3
0
 def test_set(self):
     point = gauge.GaugePointDouble()
     point.set(10)
     self.assertEqual(point.value, 10.0)
     point.set(-20.2)
     self.assertEqual(point.value, -20.2)
Exemple #4
0
 def test_init(self):
     point = gauge.GaugePointDouble()
     self.assertEqual(point.value, 0.0)
     self.assertIsInstance(point.value, float)