params: fix bug when collecting multiple params (#3615)

This commit is contained in:
Ruslan Kuprieiev
2020-04-09 15:41:35 +03:00
committed by GitHub
parent c1ac6bb06b
commit cdef709e8a
2 changed files with 12 additions and 3 deletions
+9
View File
@@ -14,6 +14,15 @@ def test_show(tmp_dir, dvc):
assert dvc.params.show() == {"": {"params.yaml": {"foo": "bar"}}}
def test_show_multiple(tmp_dir, dvc):
tmp_dir.gen("params.yaml", "foo: bar\nbaz: qux\n")
dvc.run(fname="foo.dvc", params=["foo"])
dvc.run(fname="baz.dvc", params=["baz"])
assert dvc.params.show() == {
"": {"params.yaml": {"foo": "bar", "baz": "qux"}}
}
def test_show_list(tmp_dir, dvc):
tmp_dir.gen("params.yaml", "foo:\n- bar\n- baz\n")
dvc.run(params=["foo"])