[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call
Michael Foord
report at bugs.python.org
Tue Nov 3 04:26:58 EST 2015
Michael Foord added the comment:
Have you read the docs for call? :-)
call.foo("foo") generates a call object representing a method call to the method foo. So you can do.
m = Mock()
m.foo("foo")
self.assertEqual(m.mock_calls, call.foo("foo"))
(etc)
See also the call.call_list (I believe) method for assertions on chained calls.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25532>
_______________________________________
More information about the Python-bugs-list
mailing list