示例#1
0
 def test_split_by_exclamation_mark(self):
     self.assertEqual(split_reference("To be! What a silly question"),
                      ["To be", "What a silly question"],
                      "Should be a list with two elements")
示例#2
0
 def test_split_by_question_mark(self):
     self.assertEqual(split_reference("To be? Or not to be?"),
                      ["To be", "Or not to be"],
                      "Should be a list with two elements")
示例#3
0
 def test_split_by_comma(self):
     self.assertEqual(split_reference("This, is a reference"),
                      ["This", "is a reference"],
                      "Should be a list with two elements")
示例#4
0
 def test_no_element_to_split(self):
     self.assertEqual(split_reference("This is a reference"),
                      ["This is a reference"],
                      "Should be a list with one element")
示例#5
0
 def test_empty_reference(self):
     self.assertEqual(split_reference(""), [], "Should be []")
示例#6
0
 def test_no_reference(self):
     self.assertEqual(split_reference(None), [], "Should be []")