From 1455e9551ec2b6e142a45360ad1270a772cb1ca4 Mon Sep 17 00:00:00 2001 From: Saugat Pachhai Date: Tue, 24 Mar 2020 17:33:06 +0545 Subject: [PATCH] pull/checkout: fix empty output if no state gets changed (#3520) --- dvc/command/checkout.py | 2 +- tests/unit/command/test_checkout.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dvc/command/checkout.py b/dvc/command/checkout.py index 323e34997..1c06b3ffe 100644 --- a/dvc/command/checkout.py +++ b/dvc/command/checkout.py @@ -31,7 +31,7 @@ def log_summary(stats): for state in states if stats.get(state) ) - logger.info(_human_join(summary)) + logger.info(_human_join(summary) or "No changes.") def log_changes(stats): diff --git a/tests/unit/command/test_checkout.py b/tests/unit/command/test_checkout.py index 8e0a8f5f1..0090f9355 100644 --- a/tests/unit/command/test_checkout.py +++ b/tests/unit/command/test_checkout.py @@ -47,7 +47,7 @@ def test_log_summary(caplog): del stats["modified"] _assert_output(stats, "3 added") - _assert_output({}, "") + _assert_output({}, "No changes.") def test_log_changes(caplog):