mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-26 23:09:35 +01:00
repo: Handle no commits for exp show and plots diff.
Make it consistent with all the other commands that use `brancher` (i.e. `dvc diff`, `metrics diff`, `params diff`) Closes #8163
This commit is contained in:
committed by
Ruslan Kuprieiev
parent
17b9b1571e
commit
2cef130191
@@ -1,3 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from tests.utils.plots import get_plot
|
||||
|
||||
|
||||
@@ -46,3 +48,15 @@ def test_diff_dirty(tmp_dir, scm, dvc, run_copy_metrics):
|
||||
assert get_plot(
|
||||
diff_result, "workspace", "definitions", file="", endkey="data"
|
||||
) == {"metric.json": props}
|
||||
|
||||
|
||||
@pytest.mark.vscode
|
||||
def test_no_commits(tmp_dir):
|
||||
from scmrepo.git import Git
|
||||
|
||||
from dvc.repo import Repo
|
||||
|
||||
git = Git.init(tmp_dir.fs_path)
|
||||
assert git.no_commits
|
||||
|
||||
assert Repo.init().plots.diff() == {}
|
||||
|
||||
Reference in New Issue
Block a user