[issue15323] Provide target name in output message when Mock.assert_called_once_with fails

Chris Jerdonek report at bugs.python.org
Wed Jul 11 05:55:18 CEST 2012


Chris Jerdonek <chris.jerdonek at gmail.com> added the comment:

I have a minor suggestion.  I would suggest--

+ msg = ("Expected %s to be called once. Called %s times." %
+        (repr(self._mock_name) or 'mock', self.call_count))

so that one can distinguish between self._mock_name not being defined and self._mock_name being equal to 'mock'.

----------
nosy: +cjerdonek

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


More information about the Python-bugs-list mailing list