(self)
| 1218 | (Decimal, Decimal("20.686"), 8)) |
| 1219 | |
| 1220 | def test_compare_with_math_fsum(self): |
| 1221 | # Compare with the math.fsum function. |
| 1222 | # Ideally we ought to get the exact same result, but sometimes |
| 1223 | # we differ by a very slight amount :-( |
| 1224 | data = [random.uniform(-100, 1000) for _ in range(1000)] |
| 1225 | self.assertApproxEqual(float(self.func(data)[1]), math.fsum(data), rel=2e-16) |
| 1226 | |
| 1227 | def test_strings_fail(self): |
| 1228 | # Sum of strings should fail. |
nothing calls this directly
no test coverage detected