Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 30, 2024
1 parent e2ed46c commit 54539d0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/func/experiments/test_remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,17 @@ def test_remove_all_queued_experiments(tmp_dir, scm, dvc, exp_stage):
assert len(dvc.experiments.stash_revs) == 0
assert scm.get_ref(str(ref_info)) is not None


def test_remove_all_experiments_queued_and_commits(tmp_dir, scm, dvc, exp_stage):
queue_length = 3
for i in range(queue_length):
dvc.experiments.run(exp_stage.addressing, params=[f"foo={i}"], name=f"exp{i}", queue=True)
dvc.experiments.run(
exp_stage.addressing, params=[f"foo={i}"], name=f"exp{i}", queue=True
)

results = dvc.experiments.run(exp_stage.addressing, params=[f"foo={queue_length}"],name=f"exp{queue_length}")
results = dvc.experiments.run(
exp_stage.addressing, params=[f"foo={queue_length}"], name=f"exp{queue_length}"
)
ref_info = first(exp_refs_by_rev(scm, first(results)))

removed = sorted(dvc.experiments.remove(all_commits=True, queue=True))
Expand All @@ -57,6 +62,7 @@ def test_remove_all_experiments_queued_and_commits(tmp_dir, scm, dvc, exp_stage)
assert len(dvc.experiments.stash_revs) == 0
assert scm.get_ref(str(ref_info)) is None


def test_remove_special_queued_experiments(tmp_dir, scm, dvc, exp_stage):
dvc.experiments.run(
exp_stage.addressing, params=["foo=1"], queue=True, name="queue1"
Expand Down

0 comments on commit 54539d0

Please sign in to comment.