This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients berker.peksag, docs@python, kushal.das, methane, michael.foord, rbcollins, serhiy.storchaka, xtreak, ztane
Date 2019-05-20.03:36:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1558323364.2.0.141702647197.issue24653@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-05-20 03:36:04methanesetrecipients: + methane, rbcollins, michael.foord, docs@python, berker.peksag, serhiy.storchaka, kushal.das, ztane, xtreak
2019-05-20 03:36:04methanesetmessageid: <1558323364.2.0.141702647197.issue24653@roundup.psfhosted.org>
2019-05-20 03:36:04methanelinkissue24653 messages
2019-05-20 03:36:04methanecreate