Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase test coverage for the statistics module #84511

Closed
tzabal mannequin opened this issue Apr 19, 2020 · 7 comments
Closed

Increase test coverage for the statistics module #84511

tzabal mannequin opened this issue Apr 19, 2020 · 7 comments
Labels
3.9 only security fixes tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@tzabal
Copy link
Mannequin

tzabal mannequin commented Apr 19, 2020

BPO 40331
Nosy @taleinat, @stevendaprano, @remilapeyre, @tzabal
PRs
  • bpo-40331: Increase test coverage for the statistics module #19608
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-05-13.10:30:59.362>
    created_at = <Date 2020-04-19.16:24:48.313>
    labels = ['type-feature', 'tests', '3.9']
    title = 'Increase test coverage for the statistics module'
    updated_at = <Date 2020-05-13.13:32:32.480>
    user = 'https://github.com/tzabal'

    bugs.python.org fields:

    activity = <Date 2020-05-13.13:32:32.480>
    actor = 'remi.lapeyre'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-05-13.10:30:59.362>
    closer = 'taleinat'
    components = ['Tests']
    creation = <Date 2020-04-19.16:24:48.313>
    creator = 'tzabal'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40331
    keywords = ['patch']
    message_count = 7.0
    messages = ['366788', '368771', '368772', '368773', '368774', '368775', '368782']
    nosy_count = 4.0
    nosy_names = ['taleinat', 'steven.daprano', 'remi.lapeyre', 'tzabal']
    pr_nums = ['19608']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue40331'
    versions = ['Python 3.9']

    @tzabal
    Copy link
    Mannequin Author

    tzabal mannequin commented Apr 19, 2020

    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

    @tzabal tzabal mannequin added 3.9 only security fixes tests Tests in the Lib/test dir type-feature A feature request or enhancement labels Apr 19, 2020
    @taleinat
    Copy link
    Contributor

    New changeset b809717 by Tzanetos Balitsaris in branch 'master':
    bpo-40331: Increase test coverage for the statistics module (GH-19608)
    b809717

    @taleinat
    Copy link
    Contributor

    Tzanetos, thanks for the report, PR, patience iterating through several rounds of code review comments, and overall great work!

    @stevendaprano
    Copy link
    Member

    *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.

    @taleinat
    Copy link
    Contributor

    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?

    @stevendaprano
    Copy link
    Member

    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!

    @remilapeyre
    Copy link
    Mannequin

    remilapeyre mannequin commented May 13, 2020

    > 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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes tests Tests in the Lib/test dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants