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

Method test_decimals

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

Source from the content-addressed store, hash-verified

1360 self.assertEqual(self.func(data), 22.015625)
1361
1362 def test_decimals(self):
1363 # Test mean with Decimals.
1364 D = Decimal
1365 data = [D("1.634"), D("2.517"), D("3.912"), D("4.072"), D("5.813")]
1366 random.shuffle(data)
1367 self.assertEqual(self.func(data), D("3.5896"))
1368
1369 def test_fractions(self):
1370 # Test mean with Fractions.

Callers

nothing calls this directly

Calls 4

shuffleMethod · 0.80
DClass · 0.70
assertEqualMethod · 0.45
funcMethod · 0.45

Tested by

no test coverage detected