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

Method test_floats

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

Source from the content-addressed store, hash-verified

1354 self.assertEqual(self.func(data), 4.8125)
1355
1356 def test_floats(self):
1357 # Test mean with floats.
1358 data = [17.25, 19.75, 20.0, 21.5, 21.75, 23.25, 25.125, 27.5]
1359 random.shuffle(data)
1360 self.assertEqual(self.func(data), 22.015625)
1361
1362 def test_decimals(self):
1363 # Test mean with Decimals.

Callers

nothing calls this directly

Calls 3

shuffleMethod · 0.80
assertEqualMethod · 0.45
funcMethod · 0.45

Tested by

no test coverage detected