[pypy-svn] r50381 - pypy/branch/ghop-ropes-classes/pypy/rlib/test
cfbolz at codespeak.net
cfbolz at codespeak.net
Sun Jan 6 15:42:46 CET 2008
Author: cfbolz
Date: Sun Jan 6 15:42:45 2008
New Revision: 50381
Modified:
pypy/branch/ghop-ropes-classes/pypy/rlib/test/test_ropewrapper.py
Log:
test a bit more
Modified: pypy/branch/ghop-ropes-classes/pypy/rlib/test/test_ropewrapper.py
==============================================================================
--- pypy/branch/ghop-ropes-classes/pypy/rlib/test/test_ropewrapper.py (original)
+++ pypy/branch/ghop-ropes-classes/pypy/rlib/test/test_ropewrapper.py Sun Jan 6 15:42:45 2008
@@ -63,6 +63,11 @@
s1 = self.const("a")
s2 = self.const("b") * (2 ** 30)
s3 = s1 + s2
+ assert len(s3) == 2 ** 30 + 1
+ assert s3[0] == "a"
+ assert s3[1] == "b"
+ assert s3[5] == "b"
+ assert s3[-1] == "b"
class TestString(AbstractTest, AbstractRopeTest):
const = RopeString
@@ -142,3 +147,13 @@
class TestRopesCoercion(AbstractTestCoercion):
conststr = RopeString
constunicode = RopeUnicode
+
+ def test_add_coercion_long(self):
+ s1 = self.conststr("a")
+ s2 = self.constunicode("b") * (2 ** 30)
+ s3 = s1 + s2
+ assert len(s3) == 2 ** 30 + 1
+ assert s3[0] == "a"
+ assert s3[1] == "b"
+ assert s3[5] == "b"
+ assert s3[-1] == "b"
More information about the Pypy-commit
mailing list