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

Method test_doubled_data

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

Source from the content-addressed store, hash-verified

1409 self.assertEqual(result, expected)
1410
1411 def test_doubled_data(self):
1412 # Mean of [a,b,c...z] should be same as for [a,a,b,b,c,c...z,z].
1413 data = [random.uniform(-3, 5) for _ in range(1000)]
1414 expected = self.func(data)
1415 actual = self.func(data*2)
1416 self.assertApproxEqual(actual, expected)
1417
1418 def test_regression_20561(self):
1419 # Regression test for issue 20561.

Callers

nothing calls this directly

Calls 3

uniformMethod · 0.80
assertApproxEqualMethod · 0.80
funcMethod · 0.45

Tested by

no test coverage detected