summaryrefslogtreecommitdiff
path: root/tests/test_files.py
diff options
context:
space:
mode:
authorDanny Allen <me@dannya.com>2014-09-22 12:05:55 +0100
committerDanny Allen <me@dannya.com>2014-09-22 12:05:55 +0100
commit1b6d0d06624170fb7a17738387387b1f21357e94 (patch)
tree335402fdef527656f37d3024345c9b532592bce7 /tests/test_files.py
parentc4935999f882e7317121e884629d07080f1bc776 (diff)
parentd68b95f7a0a201b2e8e830b6d4769005ef0223fa (diff)
downloadpython-coveragepy-git-1b6d0d06624170fb7a17738387387b1f21357e94.tar.gz
Merged ned/coveragepy into default
Diffstat (limited to 'tests/test_files.py')
-rw-r--r--tests/test_files.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_files.py b/tests/test_files.py
index 070430ff..648c76a9 100644
--- a/tests/test_files.py
+++ b/tests/test_files.py
@@ -99,6 +99,14 @@ class MatcherTest(CoverageTest):
self.assertMatches(fnm, "x123foo.txt", True)
self.assertMatches(fnm, "x798bar.txt", False)
+ def test_fnmatch_windows_paths(self):
+ # We should be able to match Windows paths even if we are running on
+ # a non-Windows OS.
+ fnm = FnmatchMatcher(["*/foo.py"])
+ self.assertMatches(fnm, r"dir\foo.py", True)
+ fnm = FnmatchMatcher([r"*\foo.py"])
+ self.assertMatches(fnm, r"dir\foo.py", True)
+
class PathAliasesTest(CoverageTest):
"""Tests for coverage/files.py:PathAliases"""