[pypy-svn] r48428 - in pypy/branch/pypy-rpython-unicode/rpython/ootypesystem: . test

antocuni at codespeak.net antocuni at codespeak.net
Thu Nov 8 20:16:08 CET 2007


Author: antocuni
Date: Thu Nov  8 20:16:06 2007
New Revision: 48428

Modified:
   pypy/branch/pypy-rpython-unicode/rpython/ootypesystem/ootype.py
   pypy/branch/pypy-rpython-unicode/rpython/ootypesystem/test/test_ooann.py
Log:
fix this test; the problem was the _defl method of AbstractString,
which shouldn't have been there.



Modified: pypy/branch/pypy-rpython-unicode/rpython/ootypesystem/ootype.py
==============================================================================
--- pypy/branch/pypy-rpython-unicode/rpython/ootypesystem/ootype.py	(original)
+++ pypy/branch/pypy-rpython-unicode/rpython/ootypesystem/ootype.py	Thu Nov  8 20:16:06 2007
@@ -352,10 +352,6 @@
             })
         self._setup_methods(generic_types)
 
-
-    # TODO: should it return _null or ''?
-    def _defl(self):
-        return make_string("")
     def _example(self):
         return self._defl()
 
@@ -370,6 +366,10 @@
     SELFTYPE_T = object()
     CHAR = Char
 
+    # TODO: should it return _null or ''?
+    def _defl(self):
+        return make_string('')
+
     def _enforce(self, value):
         # XXX share this with Unicode?
         TYPE = typeOf(value)
@@ -384,6 +384,10 @@
     SELFTYPE_T = object()
     CHAR = UniChar
 
+    # TODO: should it return _null or ''?
+    def _defl(self):
+        return make_unicode(u'')
+
     def _enforce(self, value):
         TYPE = typeOf(value)
         if TYPE == self.CHAR:

Modified: pypy/branch/pypy-rpython-unicode/rpython/ootypesystem/test/test_ooann.py
==============================================================================
--- pypy/branch/pypy-rpython-unicode/rpython/ootypesystem/test/test_ooann.py	(original)
+++ pypy/branch/pypy-rpython-unicode/rpython/ootypesystem/test/test_ooann.py	Thu Nov  8 20:16:06 2007
@@ -326,7 +326,6 @@
     py.test.raises(TypeError, a.build_types, f, [])
 
 def test_unicode_iterator():
-    py.test.skip("That's a nonsense!")
     from pypy.rpython.ootypesystem import rstr
     ITER = rstr.UnicodeRepr.string_iterator_repr.lowleveltype
 


More information about the pypy-svn mailing list