[pypy-commit] pypy py3k: fix test_bisect: None is no longer comparable to ints, and map no longer returns a list

antocuni noreply at buildbot.pypy.org
Fri Mar 2 10:35:51 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r53091:cb0485337b72
Date: 2012-03-02 10:30 +0100
http://bitbucket.org/pypy/pypy/changeset/cb0485337b72/

Log:	fix test_bisect: None is no longer comparable to ints, and map no
	longer returns a list

diff --git a/pypy/module/_bisect/test/test_bisect.py b/pypy/module/_bisect/test/test_bisect.py
--- a/pypy/module/_bisect/test/test_bisect.py
+++ b/pypy/module/_bisect/test/test_bisect.py
@@ -9,7 +9,6 @@
     def test_bisect_left(self):
         from _bisect import bisect_left
         a = [0, 5, 6, 6, 6, 7]
-        assert bisect_left(a, None) == 0
         assert bisect_left(a, -3) == 0
         assert bisect_left(a, 0) == 0
         assert bisect_left(a, 3) == 1
@@ -47,7 +46,6 @@
     def test_bisect_right(self):
         from _bisect import bisect_right
         a = [0, 5, 6, 6, 6, 7]
-        assert bisect_right(a, None) == 0
         assert bisect_right(a, -3) == 0
         assert bisect_right(a, 0) == 1
         assert bisect_right(a, 3) == 1
@@ -85,11 +83,11 @@
         a = [0, 5, 6, 6, 6, 7]
         insort_left(a, 6.0)
         assert a == [0, 5, 6.0, 6, 6, 6, 7]
-        assert map(type, a) == [int, int, float, int, int, int, int]
+        assert list(map(type, a)) == [int, int, float, int, int, int, int]
 
     def test_insort_right(self):
         from _bisect import insort_right
         a = [0, 5, 6, 6, 6, 7]
         insort_right(a, 6.0)
         assert a == [0, 5, 6, 6, 6, 6.0, 7]
-        assert map(type, a) == [int, int, int, int, int, float, int]
+        assert list(map(type, a)) == [int, int, int, int, int, float, int]


More information about the pypy-commit mailing list