示例#1
0
 def testCombinedItems(self):
   self.assertEqual(pdfmunge.parse_range("1, 4-6, 14, 15, 30-31"),
                    [0, 3, 4, 5, 13, 14, 29, 30])
示例#2
0
 def testCommaSeparatedItems(self):
   self.assertEqual(pdfmunge.parse_range("1,2,3"), [0, 1, 2])
示例#3
0
 def testHyphenatedRangeItems(self):
   self.assertEqual(pdfmunge.parse_range("1-3"), [0, 1, 2])
示例#4
0
 def testSingleItem(self):
   self.assertEqual(pdfmunge.parse_range("1"), [0])