Пример #1
0
 def test_normalize_steno(self):
     cases = (
     
     # TODO: More cases
     ('S', 'S'),
     ('S-', 'S'),
     ('-S', '-S'),
     ('ES', 'ES'),
     ('-ES', 'ES'),
     ('TW-EPBL', 'TWEPBL'),
     ('TWEPBL', 'TWEPBL'),
     )
     
     for arg, expected in cases:
         self.assertEqual('/'.join(normalize_steno(arg)), expected)
Пример #2
0
    def test_normalize_steno(self):
        cases = (

            # TODO: More cases
            ('S', 'S'),
            ('S-', 'S'),
            ('-S', '-S'),
            ('ES', 'ES'),
            ('-ES', 'ES'),
            ('TW-EPBL', 'TWEPBL'),
            ('TWEPBL', 'TWEPBL'),
        )

        for arg, expected in cases:
            self.assertEqual('/'.join(normalize_steno(arg)), expected)
Пример #3
0
 def test_normalize_steno(self):
     cases = (
     
     # TODO: More cases
     ('S', 'S'),
     ('S-', 'S'),
     ('-S', '-S'),
     ('ES', 'ES'),
     ('-ES', 'ES'),
     ('TW-EPBL', 'TWEPBL'),
     ('TWEPBL', 'TWEPBL'),
     ('19', '1-9'),
     ('14', '14'),
     ('146', '14-6'),
     ('67', '67'),
     ('46', '4-6'),
     ('456', '456'),
     ('S46', 'S4-6'),
     )
     
     for arg, expected in cases:
         self.assertEqual('/'.join(normalize_steno(arg)), expected)
Пример #4
0
    def test_normalize_steno(self):
        cases = (

            # TODO: More cases
            ('S', 'S'),
            ('S-', 'S'),
            ('-S', '-S'),
            ('ES', 'ES'),
            ('-ES', 'ES'),
            ('TW-EPBL', 'TWEPBL'),
            ('TWEPBL', 'TWEPBL'),
            ('19', '1-9'),
            ('14', '14'),
            ('146', '14-6'),
            ('67', '67'),
            ('46', '4-6'),
            ('456', '456'),
            ('S46', 'S4-6'),
        )

        for arg, expected in cases:
            self.assertEqual('/'.join(normalize_steno(arg)), expected)
Пример #5
0
 def h(pairs):
     return StenoDictionary((normalize_steno(x[0]), x[1]) for x in pairs)