summaryrefslogtreecommitdiff
path: root/tests/test_files.py
diff options
context:
space:
mode:
authorValentin Lab <valentin.lab@kalysto.org>2020-12-14 16:19:29 +0100
committerNed Batchelder <ned@nedbatchelder.com>2021-01-17 17:10:25 -0500
commitdc0e80657257def9203b5e0ca7b6141d3dcd1d57 (patch)
treee3aad5d5dd5db9a2ae2f27bac804418db5d71998 /tests/test_files.py
parentb0710b1fc868db5c385b3d30a2fab49a2aeb2e81 (diff)
downloadpython-coveragepy-git-dc0e80657257def9203b5e0ca7b6141d3dcd1d57.tar.gz
fix: combine aliases on windows base dirs (ie: ``X:\``) (fixes: #577)
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
Diffstat (limited to 'tests/test_files.py')
-rw-r--r--tests/test_files.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_files.py b/tests/test_files.py
index 9df4e5d0..84e25f10 100644
--- a/tests/test_files.py
+++ b/tests/test_files.py
@@ -349,6 +349,20 @@ class PathAliasesTest(CoverageTest):
'./django/foo/bar.py'
)
+ def test_windows_root_paths(self):
+ aliases = PathAliases()
+ aliases.add('X:\\', '/tmp/src')
+ self.assert_mapped(
+ aliases,
+ "X:\\a\\file.py",
+ "/tmp/src/a/file.py"
+ )
+ self.assert_mapped(
+ aliases,
+ "X:\\file.py",
+ "/tmp/src/file.py"
+ )
+
def test_leading_wildcard(self):
aliases = PathAliases()
aliases.add('*/d1', './mysrc1')