예제 #1
0
 def test_simple_average_has_count(self):
     count = 10
     average = simple_average()
     for element in range(0,count):
         average.calculate(element)
     self.assertEquals(average.count, count)
예제 #2
0
 def test_simple_average_has_count(self):
     count = 10
     average = simple_average()
     for element in range(0, count):
         average.calculate(element)
     self.assertEquals(average.count, count)
예제 #3
0
 def test_simple_average(self):
     average = simple_average()
     rv = 0
     for element in self.elements:
         rv = average.calculate(element)
     self.assertEquals(rv, 4.714285714285714)
예제 #4
0
 def test_simple_average(self):
     average = simple_average()
     rv = 0
     for element in self.elements:
         rv = average.calculate(element)
     self.assertEquals(rv, 4.714285714285714)