def test_compare_to_variance(self):
# Test that stdev is, in fact, the square root of variance.
data = [random.uniform(-17, 24) for _ in range(1000)]
expected = math.sqrt(statistics.pvariance(data))
self.assertEqual(self.func(data), expected)
评论列表
文章目录