From 5cfcc956db06bfda373ddd009cbd58ef38cc14a3 Mon Sep 17 00:00:00 2001 From: "Mr. Outis" Date: Thu, 21 Feb 2019 18:32:48 -0600 Subject: [PATCH] status: imply --cloud when a remote is given Fix #1617 --- dvc/repo/status.py | 2 +- tests/test_status.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dvc/repo/status.py b/dvc/repo/status.py index d30bee7fe..9a9013a46 100644 --- a/dvc/repo/status.py +++ b/dvc/repo/status.py @@ -76,7 +76,7 @@ def status( all_tags=False, ): with self.state: - if cloud: + if cloud or remote: return _cloud_status( self, target, diff --git a/tests/test_status.py b/tests/test_status.py index b5668169d..d164ab70d 100644 --- a/tests/test_status.py +++ b/tests/test_status.py @@ -3,6 +3,7 @@ import os from dvc.main import main from tests.basic_env import TestDvc +from mock import patch class TestStatus(TestDvc): @@ -17,3 +18,8 @@ class TestStatus(TestDvc): ret = main(["status", "--quiet"]) self.assertEqual(ret, 1) + + @patch("dvc.repo.status._cloud_status", return_value=True) + def test_implied_cloud(self, mock_status): + main(["status", "--remote", "something"]) + mock_status.assert_called()