Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e7fef52

Browse files
author
Steven D'Aprano
committed
Tighten up test of harmonic mean on a single value.
1 parent 3e8616a commit e7fef52

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

Lib/test/test_statistics.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,10 +1469,7 @@ def test_floats_exact(self):
14691469
def test_singleton_lists(self):
14701470
# Test that harmonic mean([x]) returns (approximately) x.
14711471
for x in range(1, 101):
1472-
if x in (49, 93, 98, 99):
1473-
self.assertApproxEqual(self.func([x]), x, tol=2e-14)
1474-
else:
1475-
self.assertEqual(self.func([x]), x)
1472+
self.assertEqual(self.func([x]), x)
14761473

14771474
def test_decimals_exact(self):
14781475
# Test harmonic mean with some carefully chosen Decimals.

0 commit comments

Comments
 (0)