Skip to content

When using mock to wrap an existing object, side_effect requires return_value #79511

@noamraph

Description

@noamraph
mannequin
BPO 35330
Nosy @cjw296, @voidspace, @lisroach, @mariocj89, @tirkarthi, @noamraph
PRs
  • bpo-35330: Don't call the wrapped object if side_effect is set #10973
  • [3.6] bpo-35330: Don't call the wrapped object if side_effect is set (GH10973) #11034
  • [3.7] bpo-35330: Don't call the wrapped object if side_effect is set (GH10973) #11035
  • 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-08.11:47:36.779>
    created_at = <Date 2018-11-27.17:26:39.414>
    labels = ['3.7', 'tests', '3.8', 'type-bug', 'library']
    title = 'When using mock to wrap an existing object, side_effect requires return_value'
    updated_at = <Date 2018-12-08.11:47:36.778>
    user = 'https://github.com/noamraph'

    bugs.python.org fields:

    activity = <Date 2018-12-08.11:47:36.778>
    actor = 'cjw296'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-12-08.11:47:36.779>
    closer = 'cjw296'
    components = ['Library (Lib)', 'Tests']
    creation = <Date 2018-11-27.17:26:39.414>
    creator = 'noamraph'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35330
    keywords = ['patch']
    message_count = 9.0
    messages = ['330540', '330595', '330596', '330599', '330602', '331155', '331378', '331379', '331380']
    nosy_count = 6.0
    nosy_names = ['cjw296', 'michael.foord', 'lisroach', 'mariocj89', 'xtreak', 'noamraph']
    pr_nums = ['10973', '11034', '11035']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue35330'
    versions = ['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/ directorytestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions