Inada Naoki <[email protected]> added the comment:
I concur with Serhiy. Current document and example describe clearly that this API is for checking inclusion, not equality. Current example: """ >>> mock = Mock(return_value=None) >>> mock(1) >>> mock(2) >>> mock(3) >>> mock(4) >>> calls = [call(2), call(3)] >>> mock.assert_has_calls(calls) >>> calls = [call(4), call(2), call(3)] >>> mock.assert_has_calls(calls, any_order=True) """ Empty list is allowed by same rule. There are no exception. And when people understand this API checks inclusion, calling with empty list doesn't make sense at all. So I don't think it is worth enough. ---------- nosy: +inada.naoki resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue24653> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
