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.

classification
Title: Increase test coverage for the statistics module
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: remi.lapeyre, steven.daprano, taleinat, tzabal
Priority: normal Keywords: patch

Created on 2020-04-19 16:24 by tzabal, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 19608 merged tzabal, 2020-04-19 16:36
Messages (7)
msg366788 - (view) Author: Tzanetos Balitsaris (tzabal) * Date: 2020-04-19 16:24
The statistics module is already highly tested but it seems that there are 4 statements [0] that are not executed by the equivalent unit tests. Specifically, 3 statements which are part of the `_convert`, `_find_lteq`, and `_find_rteq` functions, and 1 statement of the `harmonic_mean` function.

[0] https://codecov.io/gh/python/cpython/src/8aea4b3605059e243f1827d9328d6fc8d698c0a7/Lib/statistics.py
msg368771 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2020-05-13 10:29
New changeset b809717c1ead26b4e3693b8a5505dd8f8f666f08 by Tzanetos Balitsaris in branch 'master':
bpo-40331: Increase test coverage for the statistics module (GH-19608)
https://github.com/python/cpython/commit/b809717c1ead26b4e3693b8a5505dd8f8f666f08
msg368772 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2020-05-13 10:30
Tzanetos, thanks for the report, PR, patience iterating through several rounds of code review comments, and overall great work!
msg368773 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2020-05-13 11:26
*blink*

How did I miss this entire thing? Where was the code review?

Thanks Tal for shepherding this through, and thanks Tzanetos for caring 
about the unit tests.
msg368774 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2020-05-13 11:36
Steven, the conversation happened in the GitHub PR comments. The PR went through multiple iterations of code review, by both Kyle Stanley and myself, and I even waited an extra couple of weeks to see if anyone had any more comments before merging it...

Perhaps you missed it because you're not in the CODEOWNERS so don't automatically get notified by GitHub?
msg368775 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2020-05-13 11:46
> Perhaps you missed it because you're not in the CODEOWNERS so don't 
> automatically get notified by GitHub?

That's quite possible. I can't fix that as Github considers everything 
to do with my computer and browser too old. Until I can get a new 
computer, I'm effectively unable to use Github, so even if I was 
notified, I probably couldn't have done much.

This wasn't a complaint, I'm grateful for everyone involved. Thanks 
again!
msg368782 - (view) Author: Rémi Lapeyre (remi.lapeyre) * Date: 2020-05-13 13:32
>> Perhaps you missed it because you're not in the CODEOWNERS so don't 
>> automatically get notified by GitHub?

> That's quite possible. I can't fix that as Github considers everything 
to do with my computer and browser too old.

I don't think you need to use the Github interface to change this, you can update the .github/CODEOWNERS file and push the change in a new commit.
History
Date User Action Args
2022-04-11 14:59:29adminsetgithub: 84511
2020-05-13 13:32:32remi.lapeyresetnosy: + remi.lapeyre
messages: + msg368782
2020-05-13 11:46:51steven.dapranosetmessages: + msg368775
2020-05-13 11:36:19taleinatsetmessages: + msg368774
2020-05-13 11:26:14steven.dapranosetmessages: + msg368773
2020-05-13 10:30:59taleinatsetstatus: open -> closed
resolution: fixed
messages: + msg368772

stage: patch review -> resolved
2020-05-13 10:29:56taleinatsetnosy: + taleinat
messages: + msg368771
2020-04-19 16:59:53xtreaksetnosy: + steven.daprano
2020-04-19 16:36:25tzabalsetkeywords: + patch
stage: patch review
pull_requests: + pull_request18941
2020-04-19 16:24:48tzabalcreate