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