From 54c7e6aa663fc83e63e44d3b407fe55584ac7fdc Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 3 Jun 2014 06:37:27 -0400 Subject: Fix the new FnmatchMatcher for >100 patterns --- tests/test_files.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/test_files.py') diff --git a/tests/test_files.py b/tests/test_files.py index 991c2b1..ea1c494 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -93,6 +93,12 @@ class MatcherTest(CoverageTest): for filepath, matches in matches_to_try: self.assertMatches(fnm, filepath, matches) + def test_fnmatch_matcher_overload(self): + fnm = FnmatchMatcher(["*x%03d*.txt" % i for i in range(500)]) + self.assertMatches(fnm, "x007foo.txt", True) + self.assertMatches(fnm, "x123foo.txt", True) + self.assertMatches(fnm, "x798bar.txt", False) + class PathAliasesTest(CoverageTest): """Tests for coverage/files.py:PathAliases""" -- cgit v1.2.1