예제 #1
0
 def test_add(self):
     point = cumulative.CumulativePointDouble()
     point.add(10)
     self.assertEqual(point.value, 10.0)
     point.add(-1.0)
     self.assertEqual(point.value, 10.0)
예제 #2
0
 def test_get_value(self):
     point = cumulative.CumulativePointDouble()
     point.add(10.1)
     self.assertEqual(point.value, 10.1)
     self.assertEqual(point.get_value(), point.value)
예제 #3
0
 def test_init(self):
     point = cumulative.CumulativePointDouble()
     self.assertEqual(point.value, 0.0)
     self.assertIsInstance(point.value, float)