[New-bugs-announce] [issue23581] unittest.mock.MagicMock doesn't support matmul (@) operator

Zygmunt Krynicki report at bugs.python.org
Wed Mar 4 10:27:01 CET 2015

New submission from Zygmunt Krynicki:

Hi. I'm the upstream of Padme, a mostly transparent proxy library for Python. I was adding support for the new matmul/@ operator when I noticed that MagicMock doens't support it yet.

>>> form unittest.mock import MagicMock
>>> MagicMock() @ 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for @: 'MagicMock' and 'int'

To add support simply add 'matmul' to unittest.mock.numerics.

components: Library (Lib)
messages: 237176
nosy: zkrynicki
priority: normal
severity: normal
status: open
title: unittest.mock.MagicMock doesn't support matmul (@) operator
type: behavior
versions: Python 3.5

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list