Skip to content

Setting a side_effect on mock from create_autospec doesn't work #62026

@voidspace

Description

@voidspace
BPO 17826
Nosy @gpshead, @ezio-melotti, @merwok, @voidspace, @kushaldas
Files
  • issue17826_v1.patch: Code and test case update
  • issue17826_v2.patch: Code and test case update revision 2
  • issue17826_v3.patch: New patch with fix in proper place for side_effect for functions (includes test case).
  • 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 = 'https://github.com/voidspace'
    closed_at = <Date 2014-04-14.20:10:47.946>
    created_at = <Date 2013-04-24.10:00:07.992>
    labels = ['type-bug', 'library']
    title = "Setting a side_effect on mock from create_autospec doesn't work"
    updated_at = <Date 2014-04-14.20:10:47.945>
    user = 'https://github.com/voidspace'

    bugs.python.org fields:

    activity = <Date 2014-04-14.20:10:47.945>
    actor = 'michael.foord'
    assignee = 'michael.foord'
    closed = True
    closed_date = <Date 2014-04-14.20:10:47.946>
    closer = 'michael.foord'
    components = ['Library (Lib)']
    creation = <Date 2013-04-24.10:00:07.992>
    creator = 'michael.foord'
    dependencies = []
    files = ['30025', '30055', '34838']
    hgrepos = []
    issue_num = 17826
    keywords = ['patch']
    message_count = 9.0
    messages = ['187692', '187840', '187844', '187845', '188036', '215916', '216098', '216164', '216196']
    nosy_count = 6.0
    nosy_names = ['gregory.p.smith', 'ezio.melotti', 'eric.araujo', 'michael.foord', 'python-dev', 'kushal.das']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue17826'
    versions = ['Python 3.3', 'Python 3.4']

    Metadata

    Metadata

    Assignees

    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