(self)
| 1422 | self.assertEqual(statistics.mean([d]), d) |
| 1423 | |
| 1424 | def test_regression_25177(self): |
| 1425 | # Regression test for issue 25177. |
| 1426 | # Ensure very big and very small floats don't overflow. |
| 1427 | # See http://bugs.python.org/issue25177. |
| 1428 | self.assertEqual(statistics.mean( |
| 1429 | [8.988465674311579e+307, 8.98846567431158e+307]), |
| 1430 | 8.98846567431158e+307) |
| 1431 | big = 8.98846567431158e+307 |
| 1432 | tiny = 5e-324 |
| 1433 | for n in (2, 3, 5, 200): |
| 1434 | self.assertEqual(statistics.mean([big]*n), big) |
| 1435 | self.assertEqual(statistics.mean([tiny]*n), tiny) |
| 1436 | |
| 1437 | |
| 1438 | class TestHarmonicMean(NumericTestCase, AverageMixin, UnivariateTypeMixin): |
nothing calls this directly
no test coverage detected