Author: Armin Rigo <[email protected]>
Branch:
Changeset: r49395:1931f105c85b
Date: 2011-11-14 10:56 +0100
http://bitbucket.org/pypy/pypy/changeset/1931f105c85b/
Log: Skip an assert in a test that fails on Python 2.5.
diff --git a/pypy/objspace/std/test/test_sliceobject.py
b/pypy/objspace/std/test/test_sliceobject.py
--- a/pypy/objspace/std/test/test_sliceobject.py
+++ b/pypy/objspace/std/test/test_sliceobject.py
@@ -1,3 +1,4 @@
+import sys
from pypy.objspace.std.sliceobject import normalize_simple_slice
@@ -56,8 +57,9 @@
sl = space.newslice(w(start), w(stop), w(step))
mystart, mystop, mystep, slicelength =
sl.indices4(space, length)
assert len(range(length)[start:stop:step]) ==
slicelength
- assert slice(start, stop, step).indices(length) == (
- mystart, mystop, mystep)
+ if sys.version_info >= (2, 6): # doesn't work in 2.5
+ assert slice(start, stop, step).indices(length) ==
(
+ mystart, mystop, mystep)
class AppTest_SliceObject:
def test_new(self):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit