From b0b390ac47c3672251a49e3df042345c1aabf0a1 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 23 Aug 2011 23:10:39 -0400 Subject: More windows tweaking. --- coverage/files.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'coverage/files.py') diff --git a/coverage/files.py b/coverage/files.py index 5ec3d80..7258acc 100644 --- a/coverage/files.py +++ b/coverage/files.py @@ -168,6 +168,10 @@ class PathAliases(object): 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 to, so change slash to match + # either separator. + regex_pat = regex_pat.replace(r"\/", r"[\\/]") + # We want case-insensitive matching, so add that flag. regex = re.compile("(?i)" + regex_pat) # Normalize the result: it must end with a path separator. -- cgit v1.2.1