def test_simple(self): """Test some simple syllables.""" for v in sounds.SHORT_VOWELS: self.assertEqual('.', ''.join(sounds.meter(v))) for v in 'AIUFXeEoO': self.assertEqual('_', ''.join(sounds.meter(v))) for groups in ['aM naH yuG']: self.assertEqual('_', ''.join(sounds.meter(v)))
def test_simple(self): """Test some simple syllables.""" for v in sounds.SHORT_VOWELS: self.assertEqual(".", "".join(sounds.meter(v))) for v in "AIUFXeEoO": self.assertEqual("_", "".join(sounds.meter(v))) for groups in ["aM naH yuG"]: self.assertEqual("_", "".join(sounds.meter(v)))
def test_meghaduta(self): """Test some lines from the Meghaduta.""" verse = """ kaScitkAntAvirahaguruRA svADikArapramattaH SApenAstaMgamitamahimA varzaBogyeRa BartuH . yakzaScakre janakatanayAsnAnapuRyodakezu snigDacCAyAtaruzu vasatiM rAmagiryASramezu .. 1 .. """ mandakranta = '____.....__.__.__' for line in verse.strip().splitlines(): scan = sounds.meter(line) scan[-1] = '_' self.assertEqual(mandakranta, ''.join(scan))
def test_meghaduta(self): """Test some lines from the Meghaduta.""" verse = """ kaScitkAntAvirahaguruRA svADikArapramattaH SApenAstaMgamitamahimA varzaBogyeRa BartuH . yakzaScakre janakatanayAsnAnapuRyodakezu snigDacCAyAtaruzu vasatiM rAmagiryASramezu .. 1 .. """ mandakranta = "____.....__.__.__" for line in verse.strip().splitlines(): scan = sounds.meter(line) scan[-1] = "_" self.assertEqual(mandakranta, "".join(scan))