Author: Armin Rigo <[email protected]>
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
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit