def testAdvancedSequence2(self): self.assertEquals( "5-15x5,1-5,22", fileseq.framesToFrameRange([5, 10, 15, 1, 2, 3, 4, 5, 22], sort=False)) self.assertEquals( "1-5,5-15x5,22", fileseq.framesToFrameRange([5, 10, 15, 1, 2, 3, 4, 5, 22]))
def testBrokenChunkedSequence(self): self.assertEquals( "1-9x2,2-10x2", fileseq.framesToFrameRange([1, 3, 5, 7, 9, 2, 4, 6, 8, 10], sort=False)) self.assertEquals( "1-10", fileseq.framesToFrameRange([1, 3, 5, 7, 9, 2, 4, 6, 8, 10]))
def testBrokenSequence2(self): self.assertEquals("1,2,4-8", fileseq.framesToFrameRange([1,2,4,5,6,7,8]))
def testBrokenSequence(self): self.assertEquals("2,3,9,12", fileseq.framesToFrameRange([2,3,9,12]))
def testSimpleSequence(self): self.assertEquals("1-5", fileseq.framesToFrameRange([1,2,3,4,5]))
def testAdvancedSequence2(self): self.assertEquals("5-15x5,1-5,22", fileseq.framesToFrameRange([5,10,15,1,2,3,4,5,22], sort=False)) self.assertEquals("1-5,5-15x5,22", fileseq.framesToFrameRange([5,10,15,1,2,3,4,5,22]))
def testAdvancedSequence(self): self.assertEquals("1-3,6-8,12", fileseq.framesToFrameRange([1, 2, 3, 6, 7, 8, 12]))
def testOutOfOrderSimpleSequence(self): self.assertEquals("1-5", fileseq.framesToFrameRange([2,4,1,2,3,4,5]))
def testDuplicatedSequence(self): self.assertEquals("1,2", fileseq.framesToFrameRange([1,1,1,2,2,2])) self.assertEquals("-1,1", fileseq.framesToFrameRange([-1,-1,-1,1,1,1]))
def testNegativeSimpleSequence(self): self.assertEquals("-5-0", fileseq.framesToFrameRange([-5, -4, -3, -2, -1, 0]))
def testDuplicatedSequence(self): self.assertEquals("1-2", fileseq.framesToFrameRange([1, 1, 1, 2, 2, 2])) self.assertEquals("-1,1", fileseq.framesToFrameRange([-1, -1, -1, 1, 1, 1]))
def testChunkedSequence(self): self.assertEquals("5-25x5", fileseq.framesToFrameRange([5, 10, 15, 20, 25]))
def testBrokenSequence2(self): self.assertEquals("1-2,4-8", fileseq.framesToFrameRange([1, 2, 4, 5, 6, 7, 8]))
def testBrokenSequence(self): self.assertEquals("2-3,9,12", fileseq.framesToFrameRange([2, 3, 9, 12]))
def testChunkedSequence(self): self.assertEquals("5-25x5", fileseq.framesToFrameRange([5,10,15,20,25]))
def testOutOfOrderSimpleSequence(self): self.assertEquals("1-5", fileseq.framesToFrameRange([2, 4, 1, 2, 3, 4, 5]))
def testBrokenChunkedSequence(self): self.assertEquals("1-9x2,2-10x2", fileseq.framesToFrameRange([1,3,5,7,9,2,4,6,8,10], sort=False)) self.assertEquals("1-10", fileseq.framesToFrameRange([1,3,5,7,9,2,4,6,8,10]))
def testOutOfOrderSimpleSequence(self): self.assertEquals("1,10", fileseq.framesToFrameRange([10, 1])) self.assertEquals("10,1", fileseq.framesToFrameRange([10, 1], False))
def testNegativeSimpleSequence(self): self.assertEquals("-5-0", fileseq.framesToFrameRange([-5,-4,-3,-2,-1,0]))
def testAdvancedSequence(self): self.assertEquals("1-3,6-8,12", fileseq.framesToFrameRange([1,2,3,6,7,8,12]))
def testOutOfOrderSimpleSequence(self): self.assertEquals("1,10", fileseq.framesToFrameRange([10,1])) self.assertEquals("10,1", fileseq.framesToFrameRange([10,1], False))
def testSimpleSequence(self): self.assertEquals("1-5", fileseq.framesToFrameRange([1, 2, 3, 4, 5]))