Skip to content

unittest mock's reset_mock throws an error when an attribute has been deleted #75360

@hmvp

Description

@hmvp
mannequin
BPO 31177
Nosy @vstinner, @cjw296, @voidspace, @eli-b, @mariocj89, @miss-islington, @tirkarthi
PRs
  • bpo-31177: Skip deleted attributes while calling reset_mock #9302
  • bpo-31177: Fix reset_mock on mock with deleted children #10807
  • bpo-31177: Fix reset_mock on mock with deleted children #10836
  • [3.6] bpo-31177: Skip deleted attributes while calling reset_mock (GH-9302) #10842
  • [3.7] bpo-31177: Skip deleted attributes while calling reset_mock (GH-9302) #10843
  • 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 2018-12-01.17:58:42.475>
    created_at = <Date 2017-08-10.14:22:19.659>
    labels = ['3.7', '3.8', 'type-bug', 'library']
    title = "unittest mock's reset_mock throws an error when an attribute has been deleted"
    updated_at = <Date 2018-12-01.17:58:42.473>
    user = 'https://bugs.python.org/hmvp'

    bugs.python.org fields:

    activity = <Date 2018-12-01.17:58:42.473>
    actor = 'xtreak'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-12-01.17:58:42.475>
    closer = 'xtreak'
    components = ['Library (Lib)']
    creation = <Date 2017-08-10.14:22:19.659>
    creator = 'hmvp'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31177
    keywords = ['patch']
    message_count = 8.0
    messages = ['300090', '325340', '326322', '330740', '330846', '330847', '330848', '330857']
    nosy_count = 8.0
    nosy_names = ['vstinner', 'cjw296', 'michael.foord', 'Eli_B', 'mariocj89', 'hmvp', 'miss-islington', 'xtreak']
    pr_nums = ['9302', '10807', '10836', '10842', '10843']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue31177'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of life3.8 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions