def test__split_content__at_end(self): # Arrange content = "This is just one line" # Act result_first, result_second = FileInspector.split_content(content, len(content)) # Assert self.assertEqual("This is just one line", result_first) self.assertEqual("", result_second)
def test__split_content__pos_minus_one(self): # Arrange content = "This is just one line" # Act result_first, result_second = FileInspector.split_content(content, -1) # Assert self.assertEqual("This is just one line", result_first) self.assertEqual("", result_second)
def test__split_content__in_middle(self): # Arrange content = "This is just one line" # Act result_first, result_second = FileInspector.split_content(content, content.find("just")) # Assert self.assertEqual("This is ", result_first) self.assertEqual("just one line", result_second)