def test_geometric_mean(): for numbers, mean in [([2, 8], 4), ([4, 1, 1 / 32.], 0.5), ([0], 0)]: assert round(reports.geometric_mean(numbers), 2) == mean
def test_geometric_mean1(values): assert round(geometric_mean_old(values), 2) == round(reports.geometric_mean(values), 2)
def test_geometric_mean(numbers, mean): assert round(reports.geometric_mean(numbers), 2) == mean
def test_geometric_mean1(): lists = [1, 2, 4, 5], [0.4, 0.8], [2, 8], [10**(-5), 5000] for l in lists: assert round(geometric_mean_old(l), 2) == round(geometric_mean(l), 2)