def test_odd_decimals(self):
# Test median_grouped works with an odd number of Decimals.
D = Decimal
data = [D('5.5'), D('6.5'), D('6.5'), D('7.5'), D('8.5')]
assert len(data)%2 == 1
random.shuffle(data)
self.assertEqual(self.func(data), 6.75)
评论列表
文章目录