[pypy-svn] r51322 - pypy/branch/ghop-ropes-classes/pypy/rlib/test

vinogradov at codespeak.net vinogradov at codespeak.net
Thu Feb 7 19:30:30 CET 2008


Author: vinogradov
Date: Thu Feb  7 19:30:29 2008
New Revision: 51322

Modified:
   pypy/branch/ghop-ropes-classes/pypy/rlib/test/test_ropewrapper.py
Log:
Add some range tests for find and index

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	Thu Feb  7 19:30:29 2008
@@ -84,6 +84,8 @@
         assert s1.find("Welcome to PyPy world") == 0
         assert s1.find(s1) == 0
         py.test.raises(TypeError, s1.find, 4)
+	assert s1.find("o", 5, 10) == 9
+	assert s1.find("o", 10) == 17
     
     def test_str_index(self):
         s1 = self.const("Welcome to PyPy world")
@@ -93,6 +95,8 @@
         assert s1.index("Welcome to PyPy world") == 0
         assert s1.index(s1) == 0
         py.test.raises(TypeError, s1.index, 4)
+	assert s1.index("o", 5, 10) == 9
+	assert s1.index("o", 10) == 17
 
 class AbstractRopeTest(object):
     def test_add_long(self):



More information about the Pypy-commit mailing list