Ejemplo n.º 1
0
 def test_search_and_replace_notfound_two(self):
     result = search_replace.search_and_replace("I am Batman", "Robin", "!!",0)
     self.assertEqual(result,"ERROR: The substring entered is not found.")
Ejemplo n.º 2
0
 def test_search_and_replace_end_two(self):
     result = search_replace.search_and_replace("I am Batman", "man", "!!",0)
     self.assertEqual(result,"I am Bat!!")
Ejemplo n.º 3
0
 def test_search_and_replace_notfound_one(self):
     result = search_replace.search_and_replace("Hello World!", "lde", "@@",0)
     self.assertEqual(result,"ERROR: The substring entered is not found.")
Ejemplo n.º 4
0
 def test_search_and_replace_end_one(self):
     result = search_replace.search_and_replace("Hello World!", "ld!", "@@",0)
     self.assertEqual(result,"Hello Wor@@")
Ejemplo n.º 5
0
 def test_search_and_replace_middle_two(self):
     result = search_replace.search_and_replace("I am Batman", "am", "!!",0)
     self.assertEqual(result,"I !! Batman")
Ejemplo n.º 6
0
 def test_search_and_replace_middle_one(self):
     result = search_replace.search_and_replace("Hello World!", "llo", "@@",0)
     self.assertEqual(result,"He@@ World!")
Ejemplo n.º 7
0
 def test_search_and_replace_beginning_two(self):
     result = search_replace.search_and_replace("I am Batman", "I", "!!", 0)
     self.assertEqual(result, "!! am Batman")
Ejemplo n.º 8
0
 def test_search_and_replace_beginning_one(self):
     result = search_replace.search_and_replace("Hello World!", "Hel", "@@", 0)
     self.assertEqual(result, "@@lo World!")