[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

Raymond Hettinger report at bugs.python.org
Tue May 24 02:37:27 EDT 2016


Raymond Hettinger added the comment:

Further churning of the names will cause more harm than good.  I recommend closing this (to end the bike-shedding and the stream of superlatives from the OP).  This ship has sailed and users are already relying on the published API.

Foord: "In the absence of a *dramatically* better name leave it alone."
Storchaka: "I vote for status quo."
Murray:  "I say leave well enough alone unless someone comes up with a simply brilliant better name."
Smith: "I'm not against adding a new name if it makes glorious sense, but we should not remove the old names from unittest as that causes unnecessary pain (based on past experience)."

FWIW, most of the suggestions in this issue would not help with a "never read the docs, just reading the code" kind of user.  Without biasing the result,  ask other Python user's to guess what "assertItemsEqual" or "assertElementsEqual" do, and see whether they correctly deduce that it tests the equality of two unordered multisets formed from two input iterables.

----------

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


More information about the Python-bugs-list mailing list