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

Method test_even_decimals

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

Source from the content-addressed store, hash-verified

1645 self.assertEqual(self.func(data), F(3, 7))
1646
1647 def test_even_decimals(self):
1648 # Test median_low works with an even number of Decimals.
1649 D = Decimal
1650 data = [D('1.1'), D('2.2'), D('3.3'), D('4.4'), D('5.5'), D('6.6')]
1651 assert len(data)%2 == 0
1652 random.shuffle(data)
1653 self.assertEqual(self.func(data), D('3.3'))
1654
1655
1656class TestMedianHigh(TestMedian, UnivariateTypeMixin):

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