def test_harmonicMean_sameValue_return_1(self): zerolist = [1, 1, 1] stat = Statistics(zerolist) actual = stat.harmonicMean() expected = 1 self.assertEqual(actual, expected)
def test_harmonicMean_0value_return_None(self): zerolist = [0, 21, 414] stat = Statistics(zerolist) actual = stat.harmonicMean() expected = None self.assertEqual(actual, expected)
def test_harmonicMean_0value_return_2(self): zerolist = [1, 4, 4] stat = Statistics(zerolist) actual = stat.harmonicMean() expected = 2 self.assertEqual(actual, expected)
def test_harmonicMean_return_none(self): emptyList = [] stat = Statistics(emptyList) actual = stat.harmonicMean() expected = None self.assertEqual(actual, expected)