Skip to content

Setting a exception side_effect on a mock from create_autospec does not work #67849

@IgnacioRossi

Description

@IgnacioRossi
BPO 23661
Nosy @rbtcollins, @voidspace, @berkerpeksag
Files
  • autospec_exception.patch: Test and fix for autospeccing functions with exceptions
  • 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 2015-07-16.01:55:59.296>
    created_at = <Date 2015-03-14.00:45:40.133>
    labels = ['type-bug', 'library']
    title = 'Setting a exception side_effect on a mock from create_autospec does not work'
    updated_at = <Date 2015-11-18.11:13:20.690>
    user = 'https://bugs.python.org/IgnacioRossi'

    bugs.python.org fields:

    activity = <Date 2015-11-18.11:13:20.690>
    actor = 'and'
    assignee = 'none'
    closed = True
    closed_date = <Date 2015-07-16.01:55:59.296>
    closer = 'berker.peksag'
    components = ['Library (Lib)']
    creation = <Date 2015-03-14.00:45:40.133>
    creator = 'Ignacio Rossi'
    dependencies = []
    files = ['38479']
    hgrepos = []
    issue_num = 23661
    keywords = ['patch']
    message_count = 7.0
    messages = ['238064', '238071', '246707', '246708', '246709', '246716', '254842']
    nosy_count = 6.0
    nosy_names = ['rbcollins', 'michael.foord', 'python-dev', 'berker.peksag', 'and', 'Ignacio Rossi']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue23661'
    versions = ['Python 3.4', '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