summaryrefslogtreecommitdiff
path: root/test/test_files.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2011-08-22 07:42:17 -0400
committerNed Batchelder <ned@nedbatchelder.com>2011-08-22 07:42:17 -0400
commitc818b43e3e16df67feb73d3e0b751f096c6e5cf0 (patch)
tree6fa76977dc4ef9c577eff3ca9cc25d0b7ca33d16 /test/test_files.py
parent8a745e7b1820db4642f45893655207b9ef1acf97 (diff)
downloadpython-coveragepy-c818b43e3e16df67feb73d3e0b751f096c6e5cf0.tar.gz
PathAliases munges the fnmatch pattern, and could have accidentally borked the match.
Diffstat (limited to 'test/test_files.py')
-rw-r--r--test/test_files.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_files.py b/test/test_files.py
index 2f26c7b..565bbaa 100644
--- a/test/test_files.py
+++ b/test/test_files.py
@@ -120,6 +120,13 @@ class PathAliasesTest(CoverageTest):
aliases.add, "/ned/home/*/*/", "fooey"
)
+ def test_no_accidental_munging(self):
+ aliases = PathAliases()
+ aliases.add(r'c:\Zoo\boo', 'src/')
+ aliases.add('/home/ned$', 'src/')
+ self.assertEqual(aliases.map(r'c:\Zoo\boo\foo.py'), 'src/foo.py')
+ self.assertEqual(aliases.map(r'/home/ned$/foo.py'), 'src/foo.py')
+
def test_paths_are_os_corrected(self):
aliases = PathAliases()
aliases.add('/home/ned/*/src', './mysrc')