Beispiel #1
0
 def test_get_replacement_actual_multiple_replacements(self):
     """Test get_replacement_actual with 3 replacements."""
     utterance = 'yarasam [: yorosom] yarasam [: yorosom] ' \
                 'yarasam [: yorosom] .'
     actual_output = Extractor.get_replacement_actual(utterance)
     desired_output = 'yarasam yarasam yarasam .'
     self.assertEqual(actual_output, desired_output)
Beispiel #2
0
 def test_get_replacement_actual_one_replacement(self):
     """Test get_replacement_actual with 1 replacement."""
     utterance = 'yarasam [: yorosom] .'
     actual_output = Extractor.get_replacement_actual(utterance)
     desired_output = 'yarasam .'
     self.assertEqual(actual_output, desired_output)
Beispiel #3
0
 def test_get_replacement_actual_no_whitespace(self):
     """Test get_replacement_actual with missing whitespace."""
     utterance = 'shoulda[: should have]'
     actual_output = Extractor.get_replacement_actual(utterance)
     desired_output = 'shoulda'
     self.assertEqual(actual_output, desired_output)
Beispiel #4
0
 def test_get_replacement_actual_empty_string(self):
     """Test get_replacement_actual with an empty string."""
     utterance = ''
     actual_output = Extractor.get_replacement_actual(utterance)
     desired_output = ''
     self.assertEqual(actual_output, desired_output)