[pypy-svn] r77476 - pypy/trunk/pypy/rlib/test

agaynor at codespeak.net agaynor at codespeak.net
Wed Sep 29 23:51:31 CEST 2010


Author: agaynor
Date: Wed Sep 29 23:51:29 2010
New Revision: 77476

Modified:
   pypy/trunk/pypy/rlib/test/test_rstring.py
Log:
Added a test for r77474.

Modified: pypy/trunk/pypy/rlib/test/test_rstring.py
==============================================================================
--- pypy/trunk/pypy/rlib/test/test_rstring.py	(original)
+++ pypy/trunk/pypy/rlib/test/test_rstring.py	Wed Sep 29 23:51:29 2010
@@ -1,5 +1,8 @@
+import sys
+
+from pypy.rlib.rstring import StringBuilder, UnicodeBuilder, split, rsplit, \
+    string_repeat
 
-from pypy.rlib.rstring import StringBuilder, UnicodeBuilder, split, rsplit
 
 def test_split():
     assert split("", 'x') == ['']
@@ -39,3 +42,6 @@
     s.append_multiple_char('d', 4)
     assert s.build() == 'aabcbdddd'
     assert isinstance(s.build(), unicode)
+
+def test_string_repeat():
+    raises(MemoryError, string_repeat, "abc", sys.maxint)



More information about the Pypy-commit mailing list