params: fix diff bt active branch and workspace

This commit is contained in:
dberenbaum
2023-01-09 16:57:18 +02:00
committed by Ruslan Kuprieiev
parent c6b602a167
commit 0b192af6f4
2 changed files with 14 additions and 0 deletions
+8
View File
@@ -268,3 +268,11 @@ def test_diff_top_level_params(tmp_dir, dvc, scm, dvcfile, params_file):
"foo": {"diff": 2, "new": 5, "old": 3}
}
}
def test_diff_active_branch_no_changes(tmp_dir, scm, dvc):
tmp_dir.gen("params.yaml", "foo: bar")
dvc.run(cmd="echo params.yaml", params=["foo"], single_stage=True)
scm.add(["params.yaml", "Dvcfile"])
scm.commit("bar")
assert dvc.params.diff(a_rev=tmp_dir.scm.active_branch()) == {}