Пример #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 []")