[New-bugs-announce] [issue24997] mock.call_args compares as equal and not equal

A Kaptur report at bugs.python.org
Fri Sep 4 07:08:39 CEST 2015


New submission from A Kaptur:

mock.call_args can be both equal to and not equal to another object:

>>> m = Mock()
>>> m(1,2)
<Mock name='mock()' id='4483976016'>
>>> m.call_args
call(1, 2)
>>> m.call_args == call(1,2)
True
>>> m.call_args != call(1,2)
True

This appears to be a recent regression - it repros on trunk, but not on 3.3 or 2.7 with mock 1.3.0.

----------
components: Library (Lib)
messages: 249715
nosy: akaptur
priority: normal
severity: normal
stage: needs patch
status: open
title: mock.call_args compares as equal and not equal
type: behavior
versions: Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24997>
_______________________________________


More information about the New-bugs-announce mailing list