[pypy-commit] pypy default: Skip an assert in a test that fails on Python 2.5.

arigo noreply at buildbot.pypy.org
Mon Nov 14 10:57:11 CET 2011


Author: Armin Rigo <arigo at tunes.org>
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):


More information about the pypy-commit mailing list