MCPcopy Index your code
hub / github.com/python/cpython / test_decimals

Method test_decimals

Lib/test/test_statistics.py:1212–1218  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1210 (Fraction, Fraction(1, 2), 500))
1211
1212 def test_decimals(self):
1213 D = Decimal
1214 data = [D("0.001"), D("5.246"), D("1.702"), D("-0.025"),
1215 D("3.974"), D("2.328"), D("4.617"), D("2.843"),
1216 ]
1217 self.assertEqual(self.func(data),
1218 (Decimal, Decimal("20.686"), 8))
1219
1220 def test_compare_with_math_fsum(self):
1221 # Compare with the math.fsum function.

Callers

nothing calls this directly

Calls 4

DecimalClass · 0.90
DClass · 0.70
assertEqualMethod · 0.45
funcMethod · 0.45

Tested by

no test coverage detected