Tighten up test of harmonic mean on a single value.

This commit is contained in:
Steven D'Aprano 2016-08-09 13:19:48 +10:00
parent 3e8616abcd
commit e7fef52f98

View file

@ -1469,9 +1469,6 @@ class TestHarmonicMean(NumericTestCase, AverageMixin, UnivariateTypeMixin):
def test_singleton_lists(self): def test_singleton_lists(self):
# Test that harmonic mean([x]) returns (approximately) x. # Test that harmonic mean([x]) returns (approximately) x.
for x in range(1, 101): for x in range(1, 101):
if x in (49, 93, 98, 99):
self.assertApproxEqual(self.func([x]), x, tol=2e-14)
else:
self.assertEqual(self.func([x]), x) self.assertEqual(self.func([x]), x)
def test_decimals_exact(self): def test_decimals_exact(self):