Example #1
0
    def test_sanity_case(self):
        """transliterate() should give consistent results for round-trip transliterations"""

        for source in self.sanity_values:
            intermediate = xltrtr.transliterate(source)
            result = xltrtr.transliterate(xltrtr.format_text(intermediate))

            #print '%s = %s = %s' % (source, intermediate, result)
            self.assertEqual(source, xltrtr.format_text(result))
Example #2
0
    def test_basic_case(self):
        """transliterate() should give known result with known input"""

        for source, to in self.basic_values:
            #print '%s = %s' % (source, to)
            result = xltrtr.transliterate(source)
            self.assertEqual(to, xltrtr.format_text(result))