[issue7832] assertSameElements([0, 1, 1], [0, 0, 1]) does not fail

Florent Xicluna report at bugs.python.org
Tue Mar 9 08:18:13 CET 2010


Florent Xicluna <florent.xicluna at gmail.com> added the comment:

Some real use case for the fixed behavior:
 - the patch for #7092 has a workaround to fix the comparison locally,
   both in test_decimal and test_set
 - test_cgi was changed, before noticing that SameElements has a flaw:
http://svn.python.org/view/python/trunk/Lib/test/test_cgi.py?r1=77871&r2=77870


But there's many snippets in the test suite which look like:

  expected.sort()
  actual.sort()
  self.assertEqual(expected, actual)

Since sorting heterogeneous sequence is no longer supported in 3.x, it is painful to workaround this in each test case.

----------

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


More information about the Python-bugs-list mailing list