Author: Antonio Cuni <[email protected]>
Branch: 
Changeset: r58836:b5e563873b27
Date: 2012-11-12 11:39 +0100
http://bitbucket.org/pypy/pypy/changeset/b5e563873b27/

Log:    unskip&fix test_{upper,lower}_char for ootype (this fixes also the
        correspondent CLI tests)

diff --git a/pypy/rpython/lltypesystem/rstr.py 
b/pypy/rpython/lltypesystem/rstr.py
--- a/pypy/rpython/lltypesystem/rstr.py
+++ b/pypy/rpython/lltypesystem/rstr.py
@@ -349,11 +349,6 @@
             i += 1
         return result
 
-    def ll_upper_char(ch):
-        if 'a' <= ch <= 'z':
-            ch = chr(ord(ch) - 32)
-        return ch
-
     @jit.elidable
     def ll_lower(s):
         s_chars = s.chars
@@ -368,11 +363,6 @@
             i += 1
         return result
 
-    def ll_lower_char(ch):
-        if 'A' <= ch <= 'Z':
-            ch = chr(ord(ch) + 32)
-        return ch
-
     def ll_join(s, length, items):
         s_chars = s.chars
         s_len = len(s_chars)
diff --git a/pypy/rpython/rstr.py b/pypy/rpython/rstr.py
--- a/pypy/rpython/rstr.py
+++ b/pypy/rpython/rstr.py
@@ -771,6 +771,16 @@
         c = ord(ch)
         return 97 <= c <= 122
 
+    def ll_upper_char(ch):
+        if 'a' <= ch <= 'z':
+            ch = chr(ord(ch) - 32)
+        return ch
+
+    def ll_lower_char(ch):
+        if 'A' <= ch <= 'Z':
+            ch = chr(ord(ch) + 32)
+        return ch
+
     def ll_char_hash(ch):
         return ord(ch)
 
diff --git a/pypy/rpython/test/test_rstr.py b/pypy/rpython/test/test_rstr.py
--- a/pypy/rpython/test/test_rstr.py
+++ b/pypy/rpython/test/test_rstr.py
@@ -1082,8 +1082,4 @@
 
 
 class TestOOtype(BaseTestRstr, OORtypeMixin):
-    def test_lower_char(self):
-        py.test.skip()
-
-    def test_upper_char(self):
-        py.test.skip()
+    pass
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to