Beispiel #1
0
 def test_cslice4(self):
     pos = '1-5;7;9-11;13-15'
     expected = [1, 2, 3, 4, 5, 7, 9, 10, 11, 13, 14, 15]
     ps, set_pos = generate_positions(pos)
     self.assertEqual(expected, ps)
Beispiel #2
0
 def test_cslice3(self):
     pos = '1-5;7;9-11'
     expected = [1, 2, 3, 4, 5, 7, 9, 10, 11]
     ps, set_pos = generate_positions(pos)
     self.assertEqual(expected, ps)
Beispiel #3
0
 def test_pslice(self):
     pos = '1:5'
     expected = [1, 2, 3, 4, 5]
     ps, set_pos = generate_positions(pos)
     self.assertEqual(expected, ps)
Beispiel #4
0
 def test_cslice1(self):
     pos = '1-5;9'
     expected = [1, 2, 3, 4, 5, 9]
     ps, set_pos = generate_positions(pos)
     self.assertEqual(expected, ps)
Beispiel #5
0
 def test_sslice(self):
     pos = '1:7:2'
     expected = [1, 3, 5, 7]
     ps, set_pos = generate_positions(pos)
     self.assertEqual(expected, ps)