def test_expand_contraction_empty_input(self): # Setup input_text = '' expected_output = '' # Actual call output_text = expand_contraction(input_text) # Asserts self.assertEqual(output_text, expected_output)
def test_expand_contraction_no_contraction(self): # Setup input_text = 'Hello world' expected_output = 'Hello world' # Actual call output_text = expand_contraction(input_text) # Asserts self.assertEqual(output_text, expected_output)
def test_expand_contraction_all_contractions(self): # Setup input_text = "cannot isn't ain't couldn't" expected_output = 'cannot is not are not could not' # Actual call output_text = expand_contraction(input_text) # Asserts self.assertEqual(output_text, expected_output)
def test_expand_contraction(self): # Setup input_text = "This isn't a test" expected_output = 'This is not a test' # Actual call output_text = expand_contraction(input_text) # Asserts self.assertEqual(output_text, expected_output)