Exemplo n.º 1
0
 def test_expand(self):
     assert ref.expand('') == ''
     assert ref.expand('a1') == 'a1'
     assert ref.expand('a1[3:5]') == 'a1[3:5]'
     assert ref.expand('a1[3:5+6:7]') == 'a1[3:5]+a1[6:7]'
     assert ref.expand('a1[3:5,6:7]') == 'a1[3:5],a1[6:7]'
     assert ref.expand('a1[3:5+6:7,7:8+8:9]') == 'a1[3:5]+a1[6:7],a1[7:8]+a1[8:9]'
     assert ref.expand('a1[3:5]+a1[6:7]') == 'a1[3:5]+a1[6:7]'
     assert ref.expand('a1 a2  a3') == 'a1 a2  a3'
     assert ref.expand('a1[1:2] [2:3+3:4]') == 'a1[1:2] [2:3+3:4]'
Exemplo n.º 2
0
 def test_expand(self):
     self.assertEqual(ref.expand(''), '')
     self.assertEqual(ref.expand('a1'),
                                 'a1')
     self.assertEqual(ref.expand('a1[3:5]'),
                                 'a1[3:5]')
     self.assertEqual(ref.expand('a1[3:5+6:7]'),
                                 'a1[3:5]+a1[6:7]')
     self.assertEqual(ref.expand('a1[3:5,6:7]'),
                                 'a1[3:5],a1[6:7]')
     self.assertEqual(ref.expand('a1[3:5+6:7,7:8+8:9]'),
                                 'a1[3:5]+a1[6:7],a1[7:8]+a1[8:9]')
     self.assertEqual(ref.expand('a1[3:5]+a1[6:7]'),
                                 'a1[3:5]+a1[6:7]')
     self.assertEqual(ref.expand('a1 a2  a3'),
                                 'a1 a2  a3')
     self.assertEqual(ref.expand('a1[1:2] [2:3+3:4]'),
                                 'a1[1:2] [2:3+3:4]')