This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients iritkatriel, steven.daprano
Date 2021-08-20.10:23:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1629455030.72.0.396293974466.issue44960@roundup.psfhosted.org>
In-reply-to
Content
Hi Irit, thanks for looking at #28327.

Sorry to be That Guy who can't do it himself, but I'm still stuck with old tech and ignorance about the git way of doing things, which limits my ability to do PRs :-(

Would you be willing to add a regression test for that bug to the test_statistics.py file please?

If you can add a test case for this in

class TestGeometricMean

and make a PR that would be great. If you're not willing or able, please just reassign back to me and I'll go old school and make a patch file.

Should be fairly straight-forward, just add a method like

    def test_regression_28327(self):
        # Regression test for b.p.o. #28327
        gmean = statistics.geometric_mean
        expected = 3.80675409583932
        self.assertTrue(math.isclose(gmean([2, 3, 5, 7]), expected))
        self.assertTrue(math.isclose(gmean([2.0, 3.0, 5.0, 7.0]), expected))


Thanks.
History
Date User Action Args
2021-08-20 10:23:50steven.dapranosetrecipients: + steven.daprano, iritkatriel
2021-08-20 10:23:50steven.dapranosetmessageid: <1629455030.72.0.396293974466.issue44960@roundup.psfhosted.org>
2021-08-20 10:23:50steven.dapranolinkissue44960 messages
2021-08-20 10:23:50steven.dapranocreate