diff options
Diffstat (limited to 'tests/test_files.py')
-rw-r--r-- | tests/test_files.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test_files.py b/tests/test_files.py index 509c23b..eeb2264 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -58,16 +58,19 @@ class MatcherTest(CoverageTest): file4 = self.make_file("sub3/file4.py") file5 = self.make_file("sub3/file5.c") fl = FileLocator() - tm = TreeMatcher([ + trees = [ fl.canonical_filename("sub"), fl.canonical_filename(file4), - ]) + ] + tm = TreeMatcher(trees) self.assertTrue(tm.match(fl.canonical_filename(file1))) self.assertTrue(tm.match(fl.canonical_filename(file2))) self.assertFalse(tm.match(fl.canonical_filename(file3))) self.assertTrue(tm.match(fl.canonical_filename(file4))) self.assertFalse(tm.match(fl.canonical_filename(file5))) + self.assertEqual(tm.info(), trees) + def test_fnmatch_matcher(self): file1 = self.make_file("sub/file1.py") file2 = self.make_file("sub/file2.c") @@ -82,6 +85,8 @@ class MatcherTest(CoverageTest): self.assertTrue(fnm.match(fl.canonical_filename(file4))) self.assertFalse(fnm.match(fl.canonical_filename(file5))) + self.assertEqual(fnm.info(), ["*.py", "*/sub2/*"]) + class PathAliasesTest(CoverageTest): """Tests for coverage/files.py:PathAliases""" |