mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
exp branch: Make branch arg optional.
Default to `f"{ref_info.name}-branch"` where ref_info is inferred from the `exp_rev` argument.
Co-authored-by: Dave Berenbaum <[email protected]>
This commit is contained in:
co-authored by
Dave Berenbaum
parent
5485275b92
commit
e9fb0b92aa
@@ -246,11 +246,12 @@ def test_branch(tmp_dir, scm, dvc, exp_stage):
|
||||
|
||||
with pytest.raises(InvalidArgumentError):
|
||||
dvc.experiments.branch("foo", "branch-exists")
|
||||
dvc.experiments.branch("foo")
|
||||
dvc.experiments.branch("foo", "branch-name")
|
||||
dvc.experiments.branch(exp_a, "branch-rev")
|
||||
dvc.experiments.branch(ref_a, "branch-ref")
|
||||
|
||||
for name in ["branch-name", "branch-rev", "branch-ref"]:
|
||||
for name in ["foo-branch", "branch-name", "branch-rev", "branch-ref"]:
|
||||
assert name in scm.list_branches()
|
||||
assert scm.resolve_rev(name) == exp_a
|
||||
|
||||
|
||||
Reference in New Issue
Block a user