Beispiel #1
0
 def test_iter_morphemes_multiple_morphemes(self):
     """Test iter_morphemes with 3 morphe-words."""
     morph_words = 'VR|malik^follow+VV|liq^POL+VI|gitsi^IMP_2pS'
     actual_output = list(InuktitutReader.iter_morphemes(morph_words))
     desired_output = [('VR', 'malik', 'follow'),
                       ('VV', 'liq', 'POL'),
                       ('VI', 'gitsi', 'IMP_2pS')]
     self.assertEqual(actual_output, desired_output)
Beispiel #2
0
 def test_iter_morphemes_empty_string(self):
     """Test iter_morphemes with an empty string."""
     morph_word = ''
     actual_output = list(InuktitutReader.iter_morphemes(morph_word))
     desired_output = [('', '', '')]
     self.assertEqual(actual_output, desired_output)
Beispiel #3
0
 def test_iter_morphemes_no_match(self):
     """Test iter_morphemes with a morpheme that yields no match."""
     morph_word = 'WH|nani|whereat'
     actual_output = list(InuktitutReader.iter_morphemes(morph_word))
     desired_output = [('', '', '')]
     self.assertEqual(actual_output, desired_output)
Beispiel #4
0
 def test_iter_morphemes_standard_case(self):
     """Test iter_morphemes with a morph in the expected format."""
     morph_word = 'WH|nani^whereat'
     actual_output = list(InuktitutReader.iter_morphemes(morph_word))
     desired_output = [('WH', 'nani', 'whereat')]
     self.assertEqual(actual_output, desired_output)