python / python/cpython

Adding an assertClose() method to unittest.TestCase

Open
#71,385 26 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stdlib type-feature
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

BPO 27198
Nosy @rhettinger, @gpshead, @mdickinson, @rbtcollins, @ezio-melotti, @bitdancer, @voidspace, @berkerpeksag, @vedgar, @PythonCHB, @iritkatriel
Files
  • assertClose.patch: patch against recent default branch
  • assertClose.patch: updated with equation in the docs
  • 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 = None
    created_at = <Date 2016-06-03.18:48:32.670>
    labels = ['type-feature', 'library', '3.11']
    title = 'Adding an assertClose() method to unittest.TestCase'
    updated_at = <Date 2022-03-21.22:57:05.453>
    user = 'https://github.com/PythonCHB'
    

    bugs.python.org fields:

    activity = <Date 2022-03-21.22:57:05.453>
    actor = 'ChrisBarker'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2016-06-03.18:48:32.670>
    creator = 'ChrisBarker'
    dependencies = []
    files = ['43157', '43165']
    hgrepos = []
    issue_num = 27198
    keywords = ['patch']
    message_count = 23.0
    messages = ['267133', '267139', '267150', '267153', '267160', '267168', '267169', '267172', '267176', '267178', '267187', '267215', '267224', '267445', '268878', '268881', '269034', '269036', '269192', '415576', '415586', '415593', '415720']
    nosy_count = 12.0
    nosy_names = ['rhettinger', 'gregory.p.smith', 'mark.dickinson', 'rbcollins', 'ezio.melotti', 'r.david.murray', 'michael.foord', 'berker.peksag', 'Pam.McANulty', 'veky', 'ChrisBarker', 'iritkatriel']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue27198'
    versions = ['Python 3.11']
    

    Linked PRs
    • gh-96881

    Contributor guide

    Open the contributing guide

    First steps

    1. Read the whole issue, then the project's contributing guide.
    2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
    3. Fork the repository and make your change on a branch.
    4. Open a pull request that references the issue number.

    Research direction

    Start by reviewing the two attached assertClose.patch files and the existing unittest.TestCase assertions they target. Read the discussion and linked PR gh-96881 before deciding whether work remains; done would require an agreed assertClose() API, implementation, documentation, and tests.

    Written by the indexing model from the issue text.

    Assessment

    Tech stack
    python
    Domain
    testing
    Issue type
    Feature
    Difficulty
    4/5
    Estimated time
    3-5 days
    Activity status
    Stale
    Clarity
    Needs clarification
    Newbie friendliness
    25/100

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.