summaryrefslogtreecommitdiff
path: root/coverage/files.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-11-23 10:57:25 -0500
committerNed Batchelder <ned@nedbatchelder.com>2014-11-23 10:57:25 -0500
commitd0795c2b810d9649fdfbd559bcdcc59e8d30de97 (patch)
tree37995a9376870e488e343b3fe75f1899c240051d /coverage/files.py
parent77dcd46bbebb083bad0a9903d0f718889fa4317d (diff)
downloadpython-coveragepy-d0795c2b810d9649fdfbd559bcdcc59e8d30de97.tar.gz
fnmatch doesn't seem to use dollar any more
Diffstat (limited to 'coverage/files.py')
-rw-r--r--coverage/files.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/coverage/files.py b/coverage/files.py
index 1ed7276..03df1a7 100644
--- a/coverage/files.py
+++ b/coverage/files.py
@@ -253,11 +253,10 @@ class PathAliases(object):
pattern = abs_file(pattern)
pattern += pattern_sep
- # Make a regex from the pattern. fnmatch always adds a \Z or $ to
+ # Make a regex from the pattern. fnmatch always adds a \Z to
# match the whole string, which we don't want.
regex_pat = fnmatch.translate(pattern).replace(r'\Z(', '(')
- if regex_pat.endswith("$"):
- regex_pat = regex_pat[:-1]
+
# We want */a/b.py to match on Windows too, so change slash to match
# either separator.
regex_pat = regex_pat.replace(r"\/", r"[\\/]")