Beispiel #1
0
 def test_centered_average5(self):
     self.assertAlmostEqual(centered_average([-10, -34, -5, 0, -3, -4]),
                            -5.5, 5)
Beispiel #2
0
 def test_centered_average4(self):
     self.assertAlmostEqual(centered_average([1, 8, 50]), 8, 5)
Beispiel #3
0
 def test_centered_average2(self):
     self.assertAlmostEqual(centered_average([1, 1, 5, 10, 8, 7]), 5.25, 5)
Beispiel #4
0
 def test_centered_average3(self):
     self.assertAlmostEqual(centered_average([-10, -4, -2, -4, -2, 1]), -3,
                            5)
Beispiel #5
0
 def test_centered_average1(self):
     self.assertAlmostEqual(centered_average([1, 2, 3, 4, 100]), 3, 5)