summaryrefslogtreecommitdiff
path: root/tests/test_files.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-06-03 06:37:27 -0400
committerNed Batchelder <ned@nedbatchelder.com>2014-06-03 06:37:27 -0400
commit54c7e6aa663fc83e63e44d3b407fe55584ac7fdc (patch)
tree4bb65194736a1db97554fc7b02756e9f2ccfc03b /tests/test_files.py
parentad022ede25c3a9e995282528e97b91309fa7d279 (diff)
downloadpython-coveragepy-54c7e6aa663fc83e63e44d3b407fe55584ac7fdc.tar.gz
Fix the new FnmatchMatcher for >100 patterns
Diffstat (limited to 'tests/test_files.py')
-rw-r--r--tests/test_files.py6
1 files changed, 6 insertions, 0 deletions
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"""