Example #1
0
 def test_mean_is_zero_for_empty_dataset(self):
     self.assertEqual(average.mean([]), 0)
Example #2
0
 def test_mean_is_correct_for_known_output(self):
     self.assertEqual(average.mean([1, 2, 3]), 2)
Example #3
0
 def test_mean_returns_real_number(self):
     self.assertEqual(average.mean([1, 2]), 1.5)
Example #4
0
 def test_mean_is_zero_for_empty_dataset(self):
     self.assertEqual(average.mean([]), 0)
Example #5
0
 def test_mean_is_correct_for_single_value(self):
     self.assertEqual(average.mean([1]), 1)
Example #6
0
 def test_mean_is_correct_for_known_output(self):
     self.assertEqual(average.mean([1, 2, 3]), 2)
Example #7
0
 def test_mean_returns_real_number(self):
     self.assertEqual(average.mean([1, 2]), 1.5)
Example #8
0
 def test_mean_is_correct_for_single_value(self):
     self.assertEqual(average.mean([1]), 1)
Example #9
0
 def test_mean_returns_negative(self):
     self.assertEqual(average.mean([-1, -4, -7, -3]), -3.75)
Example #10
0
 def test_mean_real_number_values(self):
     self.assertEqual(average.mean([2.4, 2.8, 3.4, 4.2, 6.4]), 3.8400000000000007)
Example #11
0
 def test_mean_returns_negative(self):
     self.assertEqual(average.mean([-1, -4, -7, -3]), -3.75)
Example #12
0
 def test_mean_real_number_values(self):
     self.assertEqual(average.mean([2.4, 2.8, 3.4, 4.2, 6.4]),
                      3.8400000000000007)