diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2014-11-23 10:57:25 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2014-11-23 10:57:25 -0500 |
commit | d9753ec0667b8a8eec1c8e1174e9406c99f7af4d (patch) | |
tree | 849036805bece34ebd712f265c368adbde012fb9 /coverage/files.py | |
parent | 710fd179624b4e4fd379d53a4315a82aa07dc3a5 (diff) | |
download | python-coveragepy-git-d9753ec0667b8a8eec1c8e1174e9406c99f7af4d.tar.gz |
fnmatch doesn't seem to use dollar any more
Diffstat (limited to 'coverage/files.py')
-rw-r--r-- | coverage/files.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/coverage/files.py b/coverage/files.py index 1ed7276e..03df1a71 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"[\\/]") |