From fe6d543c1f92934a10d91a86459e5210d88ca166 Mon Sep 17 00:00:00 2001 From: David de la Iglesia Castro Date: Wed, 29 Mar 2023 11:31:40 +0200 Subject: [PATCH] tests: Add UnresolvedExpNamesError check in `test_remove_remote` --- tests/func/experiments/test_remove.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/func/experiments/test_remove.py b/tests/func/experiments/test_remove.py index e2fc557e4..51d2c9e24 100644 --- a/tests/func/experiments/test_remove.py +++ b/tests/func/experiments/test_remove.py @@ -2,6 +2,7 @@ import pytest from funcy import first from dvc.exceptions import InvalidArgumentError +from dvc.repo.experiments.exceptions import UnresolvedExpNamesError from dvc.repo.experiments.utils import exp_refs_by_rev @@ -121,6 +122,11 @@ def test_remove_remote(tmp_dir, scm, dvc, exp_stage, git_upstream, use_url): assert git_upstream.tmp_dir.scm.get_ref(str(ref_info_list[1])) is None assert git_upstream.tmp_dir.scm.get_ref(str(ref_info_list[2])) == exp_list[2] + with pytest.raises( + UnresolvedExpNamesError, match=f"Experiment 'foo' does not exist in '{remote}'" + ): + dvc.experiments.remove(git_remote=remote, exp_names=["foo"]) + def test_remove_experiments_by_rev(tmp_dir, scm, dvc, exp_stage): baseline = scm.get_rev()