Exemplo n.º 1
0
    def testNormalize(self):
        reverseOrder = FrameSet('5,3-1x-1')
        reverseOrder.normalize()

        self.assertEqual([1, 2, 3, 5], reverseOrder.getAll())

        duplicates = FrameSet('1-2,2-3')
        duplicates.normalize()

        self.assertEqual([1, 2, 3], duplicates.getAll())
Exemplo n.º 2
0
    def testMultipleSegments(self):
        result = FrameSet('57,1-3,4-2,12-15x2,76-70x-3,5-12y3,1-7:5')

        self.assertEqual([
            57, 1, 2, 3, 4, 3, 2, 12, 14, 76, 73, 70, 6, 7, 9, 10, 12, 1, 6, 2,
            4, 3, 5, 7
        ], result.getAll())