Lines Matching full:replace
59 replace = strop.replace
60 self.assertTrue(replace("one!two!three!", '!', '@', 1)
62 self.assertTrue(replace("one!two!three!", '!', '@', 2)
64 self.assertTrue(replace("one!two!three!", '!', '@', 3)
66 self.assertTrue(replace("one!two!three!", '!', '@', 4)
69 # CAUTION: a replace count of 0 means infinity only to strop,
70 # not to the string .replace() method or to the
71 # string.replace() function.
73 self.assertTrue(replace("one!two!three!", '!', '@', 0)
75 self.assertTrue(replace("one!two!three!", '!', '@')
77 self.assertTrue(replace("one!two!three!", 'x', '@')
79 self.assertTrue(replace("one!two!three!", 'x', '@', 2)
147 self.assertRaises(MemoryError, strop.replace, a, "A", a)