From 42344f3a106b13a3feebf109007e3957c20c3160 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 11 Apr 2020 15:34:32 -0400 Subject: Beef up the test for get_option(paths) --- tests/test_config.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tests/test_config.py') 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'] -- cgit v1.2.1