exp show: Preserve full branch and tag names.

Closes #7933
This commit is contained in:
David de la Iglesia Castro
2022-10-11 19:55:36 +09:00
committed by Peter Rowlands (변기호)
parent 5606608867
commit c12deaa62c
2 changed files with 19 additions and 5 deletions
+15
View File
@@ -48,6 +48,21 @@ def test_show_no_commits(tmp_dir):
assert Repo.init().experiments.show() == {}
@pytest.mark.vscode
def test_show_branch_and_tag_name(tmp_dir, scm, dvc, exp_stage):
with tmp_dir.branch("new/branch", new=True):
tmp_dir.scm_gen("branch", "branch", "commit")
branch_rev = scm.get_rev()
result = dvc.experiments.show(all_branches=True)
assert result[branch_rev]["baseline"]["data"]["name"] == "new/branch"
scm.tag("new/tag")
tag_rev = scm.get_rev()
result = dvc.experiments.show(all_tags=True)
assert result[tag_rev]["baseline"]["data"]["name"] == "new/tag"
@pytest.mark.vscode
def test_show_simple(tmp_dir, scm, dvc, exp_stage):
assert dvc.experiments.show()["workspace"] == {