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 rhettinger
Recipients brett.cannon, ezio.melotti, michael.foord, pitrou, r.david.murray, rhettinger
Date 2010-11-04.01:25:42
SpamBayes Score 4.8982076e-09
Marked as misclassified No
Message-id <1288833945.26.0.391847299844.issue10273@psf.upfronthosting.co.za>
In-reply-to
Content
> For the regexp methods we should use assertRegexp 

assertRegex is better.  it matches the name used in other unittest implementations, there is not confusion with camel casing RegExp vs Regexp, and it matches the former name of Python's own regex module.

> We should leave the gt / le / lt methods as they are. 

The assertLessEqual name is non-standard, it will never be spelled right by someone who hasn't used it recently.


> The documentation can be improved by moving *all* the deprecated 
> methods (new and old) out of the main documentation and
> into a separate section at the end of the documentation

See issue 10242 for a suggestion on how to handle renaming (document the new and old name in the same entry, noting that one name is old).


>> For assertItemsEqual Raymond suggests assertElementCountsEqual. 
> Why replace a long awkward name with an even longer 
> and more awkward name?

If length is an issue, assertCountsEqual will also do fine.  The important virtue is clarity.  The problem with ItemsEqual is that it doesn't tell you anything about what it does (unordered comparison where duplicates matter).  Also, the term "items" in Python usually means key/value pairs.  That is why we use the term "elements" in sets, itertools, etc.  In contrast, assertCountsEqual tells you what it does, compares the element counts.  It is the same as Counter(a)==Counter(b) for hashable elements and an equivalent for unhashable elements.
History
Date User Action Args
2010-11-04 01:25:45rhettingersetrecipients: + rhettinger, brett.cannon, pitrou, ezio.melotti, r.david.murray, michael.foord
2010-11-04 01:25:45rhettingersetmessageid: <1288833945.26.0.391847299844.issue10273@psf.upfronthosting.co.za>
2010-11-04 01:25:43rhettingerlinkissue10273 messages
2010-11-04 01:25:42rhettingercreate