Exemple #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")
Exemple #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")
Exemple #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")
Exemple #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")
Exemple #5
0
 def test_empty_reference(self):
     self.assertEqual(split_reference(""), [], "Should be []")
Exemple #6
0
 def test_no_reference(self):
     self.assertEqual(split_reference(None), [], "Should be []")