Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r54536:1373e06b8e6d
Date: 2012-04-19 15:31 +0200
http://bitbucket.org/pypy/pypy/changeset/1373e06b8e6d/

Log:    py3k-ify: maxint has gone, and __getitem__ gets a slice() object
        now. The test was previously written with __getslice__ but got
        changed in a parent revision

diff --git a/pypy/objspace/std/test/test_index.py 
b/pypy/objspace/std/test/test_index.py
--- a/pypy/objspace/std/test/test_index.py
+++ b/pypy/objspace/std/test/test_index.py
@@ -268,7 +268,7 @@
         assert self.neg.__index__() == self.neg
 
     def test_getitem(self):
-        from sys import maxint
+        from sys import maxsize as maxint
         class GetItem(object):
             def __len__(self):
                 return maxint
@@ -277,7 +277,7 @@
         x = GetItem()
         assert x[self.pos] == self.pos
         assert x[self.neg] == self.neg
-        assert x[self.neg:self.pos] == (-1, maxint)
+        assert x[self.neg:self.pos] == slice(self.neg, self.pos)
         assert x[self.neg:self.pos:1].indices(maxint) == (0, maxint, 1)
 
     def test_getslice_nolength(self):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to