STINNER Victor added the comment: If we go into this direction, I suggest to add *two* methods:
* assert_called(): called at least once * assert_called_once(): called exactly once I would be more consitent with the existing API: https://docs.python.org/dev/library/unittest.mock.html#unittest.mock.Mock.assert_not_called https://docs.python.org/dev/library/unittest.mock.html#unittest.mock.Mock.assert_called_with https://docs.python.org/dev/library/unittest.mock.html#unittest.mock.Mock.assert_called_once_with ---------- nosy: +haypo, rbcollins versions: +Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26323> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com