summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2020-04-11 15:34:32 -0400
committerNed Batchelder <ned@nedbatchelder.com>2020-04-11 15:34:32 -0400
commit42344f3a106b13a3feebf109007e3957c20c3160 (patch)
treeac80e1b6c27236fb8e4320fec90af43fa2793804 /tests
parentfd43e3509f559c55b61f92dacbd524cd42941b06 (diff)
downloadpython-coveragepy-git-42344f3a106b13a3feebf109007e3957c20c3160.tar.gz
Beef up the test for get_option(paths)
Diffstat (limited to 'tests')
-rw-r--r--tests/test_config.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/test_config.py b/tests/test_config.py
index 880368f7..51d9b9ef 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -342,9 +342,22 @@ class ConfigTest(CoverageTest):
self.assertEqual(cov.get_option("run:data_file"), "fooey.dat")
def test_tweaks_paths_after_constructor(self):
+ self.make_file(".coveragerc", """\
+ [paths]
+ first =
+ /first/1
+ /first/2
+
+ second =
+ /second/a
+ /second/b
+ """)
+ old_paths = OrderedDict()
+ old_paths["first"] = ["/first/1", "/first/2"]
+ old_paths["second"] = ["/second/a", "/second/b"]
cov = coverage.Coverage()
paths = cov.get_option("paths")
- self.assertEqual(paths, OrderedDict())
+ self.assertEqual(paths, old_paths)
new_paths = OrderedDict()
new_paths['magic'] = ['src', 'ok']