mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Tighten up test of harmonic mean on a single value.
This commit is contained in:
parent
3e8616abcd
commit
e7fef52f98
1 changed files with 1 additions and 4 deletions
|
@ -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):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue