summaryrefslogtreecommitdiff
path: root/coverage/files.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2011-08-22 07:42:17 -0400
committerNed Batchelder <ned@nedbatchelder.com>2011-08-22 07:42:17 -0400
commit103d412fe44d335804b3fa149da6ce7e686943e0 (patch)
tree4e6a4f0fa4feee377c0d022ad9f461528bdf3ec5 /coverage/files.py
parent6b00eb851344fd4c733b51d6402d36ea4158471d (diff)
downloadpython-coveragepy-git-103d412fe44d335804b3fa149da6ce7e686943e0.tar.gz
PathAliases munges the fnmatch pattern, and could have accidentally borked the match.
Diffstat (limited to 'coverage/files.py')
-rw-r--r--coverage/files.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/coverage/files.py b/coverage/files.py
index 23f1bdef..93a5ab2f 100644
--- a/coverage/files.py
+++ b/coverage/files.py
@@ -164,7 +164,7 @@ class PathAliases(object):
# Make a regex from the pattern. fnmatch always adds a \Z or $ to
# match the whole string, which we don't want.
- regex_pat = fnmatch.translate(pattern).replace(r'\Z', '')
+ regex_pat = fnmatch.translate(pattern).replace(r'\Z(', '(')
if regex_pat.endswith("$"):
regex_pat = regex_pat[:-1]
regex = re.compile("(?i)" + regex_pat)