class FileMatcherGlobTests(TestCase): def setUp(self): self.directory = mkdtemp('-caboose-file-matcher-glob-tests') def tearDown(self): rmtree(self.directory) def test_file_matcher_matches_against_glob(self): self.file_matcher = FileMatcherGlob("*.java") eq_(True, self.file_matcher.match("hello.java")) eq_(False, self.file_matcher.match("hello.java2")) def test_file_matcher_matches_against_unicode_glob(self): self.file_matcher = FileMatcherGlob(u"*.java") eq_(True, self.file_matcher.match("hello.java")) eq_(False, self.file_matcher.match("hello.java2")) def test_glob_matcher_handles_list_of_globs(self): self.file_matcher = FileMatcherGlob(["*.one", "*.two"]) eq_(True, self.file_matcher.match("hello.one")) eq_(True, self.file_matcher.match("hello.two")) eq_(False, self.file_matcher.match("hello.three"))
def test_glob_matcher_handles_list_of_globs(self): self.file_matcher = FileMatcherGlob(["*.one", "*.two"]) eq_(True, self.file_matcher.match("hello.one")) eq_(True, self.file_matcher.match("hello.two")) eq_(False, self.file_matcher.match("hello.three"))
def test_file_matcher_matches_against_unicode_glob(self): self.file_matcher = FileMatcherGlob(u"*.java") eq_(True, self.file_matcher.match("hello.java")) eq_(False, self.file_matcher.match("hello.java2"))