Example #1
0
 def testTextOnlyWhiteSpace(self):
     self.assertEqual(["As", "Python's", "creator,", "I'd", "like", "to", "say"], \
         split_text("As Python's creator, I'd like to say ",' '))
Example #2
0
 def testEmptyText(self):
     self.assertEqual([], split_text(""))
Example #3
0
 def testTextWithSingleDelimiter(self):
     self.assertEqual(["  As Python's creator", " I'd like to say  "], \
         split_text("  As Python's creator, I'd like to say  ", ','))
Example #4
0
 def testTextWithoutRightDelimiter(self):
     self.assertEqual(["  As Python's creator, I'd like to say  "], \
         split_text("  As Python's creator, I'd like to say  ", "!>"))
Example #5
0
 def testTextWithMultipleDelimiters(self):
     self.assertEqual(["As", "Python", "s", "creator", "I", "d", "like", "to", "say"], \
         split_text("  As Python's creator, I'd like to say  ",", '"))