mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 15:28:34 +01:00
metrics: diff: handle deleted/new metric (#3529)
Partial fix for https://github.com/iterative/dvc/issues/3469
This commit is contained in:
@@ -65,3 +65,21 @@ def test_metrics_diff_no_diff():
|
||||
|
||||
def test_metrics_diff_no_changes():
|
||||
assert _show_diff({}) == "No changes."
|
||||
|
||||
|
||||
def test_metrics_diff_new_metric():
|
||||
assert _show_diff(
|
||||
{"other.json": {"a.b.d": {"old": None, "new": "new"}}}
|
||||
) == (
|
||||
" Path Metric Value Change \n"
|
||||
"other.json a.b.d new diff not supported"
|
||||
)
|
||||
|
||||
|
||||
def test_metrics_diff_deleted_metric():
|
||||
assert _show_diff(
|
||||
{"other.json": {"a.b.d": {"old": "old", "new": None}}}
|
||||
) == (
|
||||
" Path Metric Value Change \n"
|
||||
"other.json a.b.d None diff not supported"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user