def test_mean_is_zero_for_empty_dataset(self): self.assertEqual(average.mean([]), 0)
def test_mean_is_correct_for_known_output(self): self.assertEqual(average.mean([1, 2, 3]), 2)
def test_mean_returns_real_number(self): self.assertEqual(average.mean([1, 2]), 1.5)
def test_mean_is_correct_for_single_value(self): self.assertEqual(average.mean([1]), 1)
def test_mean_returns_negative(self): self.assertEqual(average.mean([-1, -4, -7, -3]), -3.75)
def test_mean_real_number_values(self): self.assertEqual(average.mean([2.4, 2.8, 3.4, 4.2, 6.4]), 3.8400000000000007)