Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dvc/stage/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def cmd_run(stage, *args, **kwargs):

def run_stage(stage, dry=False, force=False, run_cache=False):
if dry:
logger.info("Running command:\n\t{}".format(stage.cmd))
return
stage_cache = stage.repo.stage_cache
stage_cached = (
Expand Down
10 changes: 10 additions & 0 deletions tests/unit/stage/test_run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import logging

from dvc.stage import Stage
from dvc.stage.run import run_stage


def test_run_stage_dry(caplog):
with caplog.at_level(level=logging.INFO, logger="dvc"):
run_stage(Stage(None, cmd="mycmd arg1 arg2"), dry=True)
assert caplog.messages == ["Running command:\n\tmycmd arg1 arg2"]
File renamed without changes.