[issue44960] Add regression test for geometric test

2021-08-20 Thread Steven D'Aprano


New submission from Steven D'Aprano :

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.

--
assignee: iritkatriel
messages: 399956
nosy: iritkatriel, steven.daprano
priority: normal
severity: normal
status: open
title: Add regression test for geometric test
type: behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44960] Add regression test for geometric test

2021-08-20 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44960] Add regression test for geometric test

2021-08-20 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +patch
pull_requests: +26315
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/27856

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com