[pypy-commit] pypy py3k: we can no longer sort mixed types. Use set() instead of sorted() to compare the content of the lists

antocuni noreply at buildbot.pypy.org
Fri Mar 2 11:25:07 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r53096:3af950e78b9e
Date: 2012-03-02 11:17 +0100
http://bitbucket.org/pypy/pypy/changeset/3af950e78b9e/

Log:	we can no longer sort mixed types. Use set() instead of sorted() to
	compare the content of the lists

diff --git a/pypy/objspace/std/test/test_listobject.py b/pypy/objspace/std/test/test_listobject.py
--- a/pypy/objspace/std/test/test_listobject.py
+++ b/pypy/objspace/std/test/test_listobject.py
@@ -404,7 +404,7 @@
         # this raised TypeError on ListStrategies
         l1 = ["a", "2", True, "a"]
         l2 = [1, "2", "a", "a"]
-        assert sorted(l1) == sorted(l2)
+        assert set(l1) == set(l2)
 
     def test_notequals(self):
         assert [1,2,3,4] != [1,2,5,4]


More information about the pypy-commit mailing list