python / python/cpython

Add __qualname__ for attributes of Mock instances

Open
#77,133 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.9 (EOL) tests type-feature
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

BPO 32952
Nosy @voidspace, @s-kostyuk, @tirkarthi
Files
  • qualname_for_mocks.py: This file contains an illustation of the current and desired behaviour of Mocks from unittest.mock Python module
  • 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 2018-02-25.19:52:11.900>
    labels = ['type-feature', 'tests', '3.9']
    title = 'Add __qualname__ for attributes of Mock instances'
    updated_at = <Date 2019-12-13.11:03:26.962>
    user = 'https://github.com/s-kostyuk'
    

    bugs.python.org fields:

    activity = <Date 2019-12-13.11:03:26.962>
    actor = 'xtreak'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Tests']
    creation = <Date 2018-02-25.19:52:11.900>
    creator = 's_kostyuk'
    dependencies = []
    files = ['47462']
    hgrepos = []
    issue_num = 32952
    keywords = []
    message_count = 2.0
    messages = ['312849', '358327']
    nosy_count = 3.0
    nosy_names = ['michael.foord', 's_kostyuk', 'xtreak']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue32952'
    versions = ['Python 3.9']
    

    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 attached qualname_for_mocks.py illustration and the unittest.mock module to understand the current and desired Mock behavior. Locate the relevant Mock attribute handling and existing tests; done means the behavior matches the illustration and is covered by tests.

    Written by the indexing model from the issue text.

    Assessment

    Tech stack
    python
    Domain
    testing
    Issue type
    Feature
    Difficulty
    3/5
    Estimated time
    1-2 days
    Activity status
    Stale
    Clarity
    Mostly clear
    Newbie friendliness
    35/100

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.