Ejemplo n.º 1
0
 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)))
Ejemplo n.º 2
0
 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)))
Ejemplo n.º 3
0
 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)))
Ejemplo n.º 4
0
    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))
Ejemplo n.º 5
0
    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))