Skip to content

Commit

Permalink
Beef up the test for get_option(paths)
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Apr 11, 2020
1 parent fd43e35 commit 42344f3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,22 @@ def test_tweaks_after_constructor(self):
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']
Expand Down

0 comments on commit 42344f3

Please sign in to comment.