A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-October/105124.html below:

[Python-Dev] Cleaning-up the new unittest API

[Python-Dev] Cleaning-up the new unittest API [Python-Dev] Cleaning-up the new unittest APIMatthew Woodcraft matthew at woodcraft.me.uk
Sun Oct 31 23:47:58 CET 2010
Raymond Hettinger  <raymond.hettinger at gmail.com> wrote:
> I looked at this again and think we should just remove
> assertItemsEqual() from Py3.2 and dedocument it in Py2.7.  It is listed
> as being new in 3.2 so nothing is lost.

One thing that would be lost is that correct Python 2.7 code using
assertItemsEqual would no longer run on 3.2.


> The sole benefit over the more explicit variants like
> assertEqual(set(a), set(b)) and assertEqual(sorted(a), sorted(b)) is
> that it handles a somewhat rare corner case where neither of those
> work (unordered comparison of non-compable types when you do care
> about duplicates).

Another benefit is that it gives better descriptions of differences. See
http://bugs.python.org/issue9977 for an example.

-M-

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4