[pypy-commit] pypy py3k: range() is not a list anymore, and objspace.std.withrangelist was removed

amauryfa noreply at buildbot.pypy.org
Sat Jan 28 17:57:22 CET 2012


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r51913:07a52ec2616d
Date: 2012-01-28 09:33 +0100
http://bitbucket.org/pypy/pypy/changeset/07a52ec2616d/

Log:	range() is not a list anymore, and objspace.std.withrangelist was
	removed

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
@@ -1148,97 +1148,6 @@
         assert l == []
         assert list(g) == []
 
-class AppTestForRangeLists(AppTestW_ListObject):
-
-    def setup_class(cls):
-        cls.space = gettestobjspace(**{"objspace.std.withrangelist" :
-                                       True})
-
-    def test_range_simple_backwards(self):
-        x = range(5,1)
-        assert x == []
-
-    def test_range_big_start(self):
-        x = range(1,10)
-        x[22:0:-1] == range(1,10)
-
-    def test_range_list_invalid_slice(self):
-        x = [1,2,3,4]
-        assert x[10:0] == []
-        assert x[10:0:None] == []
-
-        x = range(1,5)
-        assert x[10:0] == []
-        assert x[10:0:None] == []
-
-        assert x[0:22] == [1,2,3,4]
-        assert x[-1:10] == [4]
-
-        assert x[0:22:None] == [1,2,3,4]
-        assert x[-1:10:None] == [4]
-
-    def test_range_backwards(self):
-        x = range(1,10)
-        assert x[22:-10] == []
-        assert x[22:-10:-1] == [9,8,7,6,5,4,3,2,1]
-        assert x[10:3:-1] == [9,8,7,6,5]
-        assert x[10:3:-2] == [9,7,5]
-        assert x[1:5:-1] == []
-
-    def test_sort_range(self):
-        l = range(3,10,3)
-        l.sort()
-        assert l == [3, 6, 9]
-        l.sort(reverse = True)
-        assert l == [9, 6, 3]
-        l.sort(reverse = True)
-        assert l == [9, 6, 3]
-        l.sort()
-        assert l == [3, 6, 9]
-
-    def test_slice(self):
-        l = []
-        l2 = range(3)
-        l.__setslice__(0,3,l2)
-        assert l == [0,1,2]
-
-    def test_getitem(self):
-        l = range(5)
-        raises(IndexError, "l[-10]")
-
-    def test_append(self):
-        l = range(5)
-        l.append(26)
-        assert l == [0,1,2,3,4,26]
-
-        l = range(5)
-        l.append("a")
-        assert l == [0,1,2,3,4,"a"]
-
-        l = range(5)
-        l.append(5)
-        assert l == [0,1,2,3,4,5]
-
-    def test_pop(self):
-        l = range(3)
-        assert l.pop(0) == 0
-
-    def test_setitem(self):
-        l = range(3)
-        l[0] = 1
-        assert l == [1,1,2]
-
-    def test_inset(self):
-        l = range(3)
-        l.insert(1,5)
-        assert l == [0,5,1,2]
-
-    def test_reverse(self):
-        l = range(3)
-        l.reverse()
-        assert l == [2,1,0]
-
-
 class AppTestListFastSubscr:
 
     def setup_class(cls):


More information about the pypy-commit mailing list