예제 #1
0
 def test_get_replacement_target_multiple_replacements(self):
     """Test get_replacement_target with 3 replacements."""
     utterance = 'yarasam [: yorosom] yarasam [: yorosom] ' \
                 'yarasam [: yorosom] .'
     actual_output = Extractor.get_replacement_target(utterance)
     desired_output = 'yorosom yorosom yorosom .'
     self.assertEqual(actual_output, desired_output)
예제 #2
0
 def test_get_replacement_target_no_withespace(self):
     """Test without whitespace."""
     utterance = 'shouldada[: should have done]'
     actual_output = Extractor.get_replacement_target(utterance)
     desired_output = 'should_have_done'
     self.assertEqual(actual_output, desired_output)
예제 #3
0
 def test_get_replacement_target_one_by_three(self):
     """Test get_replacement_target with 1 replacement."""
     utterance = 'shouldada [: should have done]'
     actual_output = Extractor.get_replacement_target(utterance)
     desired_output = 'should_have_done'
     self.assertEqual(actual_output, desired_output)
예제 #4
0
 def test_get_replacement_target_empty_string(self):
     """Test get_replacement_target with an empty string."""
     utterance = ''
     actual_output = Extractor.get_replacement_target(utterance)
     desired_output = ''
     self.assertEqual(actual_output, desired_output)
예제 #5
0
 def test_get_replacement_target_no_replacement(self):
     """Test get_replacement_target with no replacement."""
     utterance = 'yarasam .'
     actual_output = Extractor.get_replacement_target(utterance)
     desired_output = 'yarasam .'
     self.assertEqual(actual_output, desired_output)