예제 #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)))
예제 #2
0
파일: sounds.py 프로젝트: sanskrit/sanskrit
 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)))
예제 #3
0
파일: sounds.py 프로젝트: sanskrit/sanskrit
 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)))
예제 #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))
예제 #5
0
파일: sounds.py 프로젝트: sanskrit/sanskrit
    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))