Skip to content

mock.MagicMock does not mock __truediv__ #65167

@JohannesBaiter

Description

@JohannesBaiter
BPO 20968
Nosy @rhettinger, @voidspace
Files
  • mock_truediv.diff: Make unittest.mock.MagicMock mock truediv and rtruediv
  • mock_truediv_numerics.diff: Add 'truediv' to global 'numerics' instead of 'magic_methods'
  • mock_truediv_with_tests.diff: Add tests
  • 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.15:44:42.196>
    created_at = <Date 2014-03-18.14:13:34.429>
    labels = ['type-bug', 'library']
    title = 'mock.MagicMock does not mock __truediv__'
    updated_at = <Date 2014-04-14.15:44:42.195>
    user = 'https://bugs.python.org/JohannesBaiter'

    bugs.python.org fields:

    activity = <Date 2014-04-14.15:44:42.195>
    actor = 'michael.foord'
    assignee = 'michael.foord'
    closed = True
    closed_date = <Date 2014-04-14.15:44:42.196>
    closer = 'michael.foord'
    components = ['Library (Lib)']
    creation = <Date 2014-03-18.14:13:34.429>
    creator = 'Johannes.Baiter'
    dependencies = []
    files = ['34490', '34491', '34515']
    hgrepos = []
    issue_num = 20968
    keywords = ['patch']
    message_count = 10.0
    messages = ['213964', '213968', '213973', '214077', '214083', '214084', '215228', '215357', '216094', '216101']
    nosy_count = 4.0
    nosy_names = ['rhettinger', 'michael.foord', 'python-dev', 'Johannes.Baiter']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue20968'
    versions = ['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