Пример #1
0
 def test_mean_is_zero_for_empty_dataset(self):
     self.assertEqual(average.mean([]), 0)
Пример #2
0
 def test_mean_is_correct_for_known_output(self):
     self.assertEqual(average.mean([1, 2, 3]), 2)
Пример #3
0
 def test_mean_returns_real_number(self):
     self.assertEqual(average.mean([1, 2]), 1.5)
Пример #4
0
 def test_mean_is_zero_for_empty_dataset(self):
     self.assertEqual(average.mean([]), 0)
Пример #5
0
 def test_mean_is_correct_for_single_value(self):
     self.assertEqual(average.mean([1]), 1)
Пример #6
0
 def test_mean_is_correct_for_known_output(self):
     self.assertEqual(average.mean([1, 2, 3]), 2)
Пример #7
0
 def test_mean_returns_real_number(self):
     self.assertEqual(average.mean([1, 2]), 1.5)
Пример #8
0
 def test_mean_is_correct_for_single_value(self):
     self.assertEqual(average.mean([1]), 1)
Пример #9
0
 def test_mean_returns_negative(self):
     self.assertEqual(average.mean([-1, -4, -7, -3]), -3.75)
Пример #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)
Пример #11
0
 def test_mean_returns_negative(self):
     self.assertEqual(average.mean([-1, -4, -7, -3]), -3.75)
Пример #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)