From e5145e6c55336159ca8733bdd20c48667639d003 Mon Sep 17 00:00:00 2001 From: "Mr. Outis" Date: Thu, 30 Jan 2020 13:15:43 -0600 Subject: [PATCH] diff: format summary to make it more human readable Co-authored-by: @dmpetrov --- dvc/command/diff.py | 4 ++-- tests/unit/command/test_diff.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dvc/command/diff.py b/dvc/command/diff.py index fdf8657da7..423a089a7f 100644 --- a/dvc/command/diff.py +++ b/dvc/command/diff.py @@ -87,8 +87,8 @@ def _digest(checksum): ) groups.append( - "summary: added ({added}), deleted ({deleted})," - " modified ({modified})".format_map(summary) + "files summary: {added} added, {deleted} deleted," + " {modified} modified".format_map(summary) ) return "\n\n".join(groups) diff --git a/tests/unit/command/test_diff.py b/tests/unit/command/test_diff.py index 5d5a594616..6ce2be58da 100644 --- a/tests/unit/command/test_diff.py +++ b/tests/unit/command/test_diff.py @@ -19,7 +19,7 @@ def test_default(mocker, caplog): "Added:\n" " file\n" "\n" - "summary: added (1), deleted (0), modified (0)" + "files summary: 1 added, 0 deleted, 0 modified" ) in caplog.text @@ -51,7 +51,7 @@ def test_checksums(mocker, caplog): "Modified:\n" " AAAAAAAA..BBBBBBBB file\n" "\n" - "summary: added (0), deleted (2), modified (1)" + "files summary: 0 added, 2 deleted, 1 modified" ) in caplog.text