[pypy-commit] pypy default: merge heads

arigo noreply at buildbot.pypy.org
Tue Sep 13 10:58:03 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r47243:179987792c13
Date: 2011-09-13 10:57 +0200
http://bitbucket.org/pypy/pypy/changeset/179987792c13/

Log:	merge heads

diff --git a/pypy/rpython/test/test_rbuilder.py b/pypy/rpython/test/test_rbuilder.py
--- a/pypy/rpython/test/test_rbuilder.py
+++ b/pypy/rpython/test/test_rbuilder.py
@@ -101,6 +101,23 @@
         res = self.interpret(func, [1])
         assert res
 
+    def test_unicode_builder_or_none(self):
+        def g(s):
+            if s:
+                s.append(u"3")
+            return bool(s)
+        
+        def func(i):
+            if i:
+                s = UnicodeBuilder()
+            else:
+                s = None
+            return g(s)
+        res = self.interpret(func, [0])
+        assert not res
+        res = self.interpret(func, [1])
+        assert res
+
 
 class TestLLtype(BaseTestStringBuilder, LLRtypeMixin):
     pass


More information about the pypy-commit mailing list