Exemple #1
0
    def _test_matches(self, pattern, positive, negative):
        matcher = get_glob_matcher(pattern)

        for path in positive:
            if not matcher(path):
                raise self.failureException("{!r} does not match {!r}".format(
                    pattern, path))

        for path in negative:
            if matcher(path):
                raise self.failureException("{!r} matches {!r}".format(
                    pattern, path))
Exemple #2
0
 def test_recursive_invalid(self):
     with self.assertRaises(ValueError):
         get_glob_matcher('foo**')