Skip to content

unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__' #70891

@asottile

Description

@asottile
mannequin
BPO 26704
Nosy @cjw296, @voidspace, @asottile, @tirkarthi
PRs
  • bpo-26704: Add test for double patching instance methods #11085
  • [3.7] bpo-26704 - Add test for double patching instance methods (GH-11085) #11126
  • Files
  • patch
  • patch2
  • 2.patch
  • 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-12.09:01:53.837>
    created_at = <Date 2016-04-06.20:01:26.286>
    labels = ['type-bug', 'library']
    title = "unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'"
    updated_at = <Date 2018-12-12.09:01:53.837>
    user = 'https://bugs.python.org/asottile'

    bugs.python.org fields:

    activity = <Date 2018-12-12.09:01:53.837>
    actor = 'cjw296'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-12-12.09:01:53.837>
    closer = 'cjw296'
    components = ['Library (Lib)']
    creation = <Date 2016-04-06.20:01:26.286>
    creator = 'asottile'
    dependencies = []
    files = ['42384', '42387', '42675']
    hgrepos = []
    issue_num = 26704
    keywords = ['patch']
    message_count = 9.0
    messages = ['262960', '262966', '262972', '264611', '331430', '331536', '331579', '331588', '331590']
    nosy_count = 5.0
    nosy_names = ['cjw296', 'michael.foord', 'asottile', 'Anthony Sottile', 'xtreak']
    pr_nums = ['11085', '11126']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue26704'
    versions = ['Python 3.5', 'Python 3.6']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      stdlibStandard 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