diff options
author | Steven D'Aprano <steve@pearwood.info> | 2016-08-09 03:19:48 (GMT) |
---|---|---|
committer | Steven D'Aprano <steve@pearwood.info> | 2016-08-09 03:19:48 (GMT) |
commit | e7fef52f9865b29785be04d1dc7d9b0b52f3c085 (patch) | |
tree | fe21f160af899e0449858dad8fffd08ea58ead2c | |
parent | 3e8616abcd7fa860ad29a351610fb1ca4fee063a (diff) | |
download | cpython-e7fef52f9865b29785be04d1dc7d9b0b52f3c085.zip cpython-e7fef52f9865b29785be04d1dc7d9b0b52f3c085.tar.gz cpython-e7fef52f9865b29785be04d1dc7d9b0b52f3c085.tar.bz2 |
Tighten up test of harmonic mean on a single value.
-rw-r--r-- | Lib/test/test_statistics.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/test/test_statistics.py b/Lib/test/test_statistics.py index 1542d64..4b3fd36 100644 --- a/Lib/test/test_statistics.py +++ b/Lib/test/test_statistics.py @@ -1469,10 +1469,7 @@ class TestHarmonicMean(NumericTestCase, AverageMixin, UnivariateTypeMixin): def test_singleton_lists(self): # Test that harmonic mean([x]) returns (approximately) x. 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): # Test harmonic mean with some carefully chosen Decimals. |