[pypy-commit] pypy default: a test for 2868163b3dc4
fijal
noreply at buildbot.pypy.org
Tue Sep 13 10:27:27 CEST 2011
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r47239:e19cad73e3c7
Date: 2011-09-13 10:26 +0200
http://bitbucket.org/pypy/pypy/changeset/e19cad73e3c7/
Log: a test for 2868163b3dc4
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