Exemplo n.º 1
0
    def test_beyond_single_characters(self):
        gen = cc.var_name_generator()
        for i in range(0, 26):
            gen.next()

        self.assertEqual(gen.next(), 'aa')
        self.assertEqual(gen.next(), 'ab')
        self.assertEqual(gen.next(), 'ac')


        for i in range(0, 23):
            gen.next()

        self.assertEqual(gen.next(), 'ba')
        self.assertEqual(gen.next(), 'bb')
        self.assertEqual(gen.next(), 'bc')
Exemplo n.º 2
0
 def test_simple(self):
     gen = cc.var_name_generator()
     self.assertEqual(gen.next(), 'a')
     self.assertEqual(gen.next(), 'b')
     self.assertEqual(gen.next(), 'c')