def test_two_the_same_substitution(self):

        template = "/path/%(frame)d/image.%(frame)04d.tif"
        result = list(Sequence.permutations(template, frame="0-20x2"))
        self.assertIn("/path/8/image.0008.tif", result)
        self.assertIn("/path/12/image.0012.tif", result)
        self.assertEqual(len(result), 11)
    def test_one_substitution(self):

        template = "image.%(frame)04d.tif"
        result = list(Sequence.permutations(template, frame="0-20x2"))
        self.assertIn("image.0008.tif", result)
        self.assertIn("image.0012.tif", result)
        self.assertEqual(len(result), 11)
 def test_three_substitutions(self):
     template = "image_%(uval)02d_%(vval)02d.%(frame)04d.tif"
     kw = {"uval": "1-2", "vval": "1-2", "frame": "10-11"}
     result = list(Sequence.permutations(template, **kw))
     self.assertIn("image_01_01.0010.tif", result)
     self.assertIn("image_02_02.0011.tif", result)
     self.assertIn("image_02_01.0010.tif", result)
     self.assertEqual(len(result), 8)