[pypy-svn] r61640 - pypy/trunk/pypy/objspace/std/test
arigo at codespeak.net
arigo at codespeak.net
Sun Feb 8 18:12:11 CET 2009
Author: arigo
Date: Sun Feb 8 18:12:10 2009
New Revision: 61640
Modified:
pypy/trunk/pypy/objspace/std/test/test_unicodeobject.py
Log:
Skip this test on top of Python 2.4 or earlier,
which shows the same strange corner case for unicode.rfind().
Modified: pypy/trunk/pypy/objspace/std/test/test_unicodeobject.py
==============================================================================
--- pypy/trunk/pypy/objspace/std/test/test_unicodeobject.py (original)
+++ pypy/trunk/pypy/objspace/std/test/test_unicodeobject.py Sun Feb 8 18:12:10 2009
@@ -39,6 +39,10 @@
class AppTestUnicodeString:
+ def setup_class(cls):
+ import sys
+ cls.w_version_info = cls.space.wrap(sys.version_info)
+
def test_addition(self):
def check(a, b):
assert a == b
@@ -571,6 +575,10 @@
assert u'abcdefghiabc'.rfind(u'') == 12
assert u'abcdefghiabc'.rfind(u'abcd') == 0
assert u'abcdefghiabc'.rfind(u'abcz') == -1
+
+ def test_rfind_corner_case(self):
+ if self.version_info < (2, 5):
+ skip("fails on top of CPython <= 2.4")
assert u'abc'.rfind('', 4) == -1
def test_count(self):
More information about the Pypy-commit
mailing list