summaryrefslogtreecommitdiff
path: root/tests/test_config.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2019-11-28 16:17:35 -0500
committerNed Batchelder <ned@nedbatchelder.com>2019-11-28 16:17:35 -0500
commit5901967e95ae72ec2b5be05bc08e1924e08a604b (patch)
treec4cef786d1a0d9f596b3545111ddae2f8f14ff25 /tests/test_config.py
parent4e3e44bcea08674219e2ed16617633a562763f67 (diff)
downloadpython-coveragepy-git-5901967e95ae72ec2b5be05bc08e1924e08a604b.tar.gz
Don't do vars and users in abs_file
It meant file names could be incorrectly expanded.
Diffstat (limited to 'tests/test_config.py')
-rw-r--r--tests/test_config.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py
index 7979a84d..fe9e001e 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -275,6 +275,11 @@ class ConfigTest(CoverageTest):
exclude_lines =
~/data.file
~joe/html_dir
+
+ [paths]
+ mapping =
+ ~/src
+ ~joe/source
""")
def expanduser(s):
"""Fake tilde expansion"""
@@ -288,6 +293,7 @@ class ConfigTest(CoverageTest):
self.assertEqual(cov.config.html_dir, "/Users/joe/html_dir")
self.assertEqual(cov.config.xml_output, "/Users/me/somewhere/xml.out")
self.assertEqual(cov.config.exclude_list, ["~/data.file", "~joe/html_dir"])
+ self.assertEqual(cov.config.paths, {'mapping': ['/Users/me/src', '/Users/joe/source']})
def test_tilde_in_toml_config(self):
# Config entries that are file paths can be tilde-expanded.