summaryrefslogtreecommitdiff
path: root/tests/test_files.py
diff options
context:
space:
mode:
authorDanny Allen <danny.allen@pennantplc.co.uk>2014-09-22 12:10:53 +0100
committerDanny Allen <danny.allen@pennantplc.co.uk>2014-09-22 12:10:53 +0100
commit945aba067acd336f87e7d94cd8a1ab602fdacb4a (patch)
tree09146e7eb8ae2f75148bf3a3982e73b1e5d5deae /tests/test_files.py
parente7b771868e1348c6f2b775a347efdee5504930e0 (diff)
parentdb7911c6a6687e75eb8c4fdd61a019641b88862b (diff)
downloadpython-coveragepy-945aba067acd336f87e7d94cd8a1ab602fdacb4a.tar.gz
* Merge changes from head.
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 070430f..648c76a 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"""