From 103d412fe44d335804b3fa149da6ce7e686943e0 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 22 Aug 2011 07:42:17 -0400 Subject: PathAliases munges the fnmatch pattern, and could have accidentally borked the match. --- coverage/files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coverage/files.py') 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) -- cgit v1.2.1