Skip to content

Commit

Permalink
Outputs as target supporting for dvc status
Browse files Browse the repository at this point in the history
fix iterative#4191
1. Add a related test which would fail on current version.
  • Loading branch information
karajan1001 committed Aug 20, 2020
1 parent 32b5b33 commit e29f99d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/func/test_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,23 @@ def test_status_recursive(tmp_dir, dvc):
}
],
}


def test_status_outputs(tmp_dir, dvc, caplog):
dvc.run(
outs=["alice", "bob"],
cmd="echo alice>alice && echo bob>bob",
name="alice_bob",
)
tmp_dir.gen("alice", "bob")
tmp_dir.gen("bob", "alice")
assert main(["status", "alice_bob"]) == 0
assert "alice_bob:" in caplog.text
assert "changed outs:" in caplog.text
assert "modified: alice" in caplog.text
assert "modified: bob" in caplog.text
caplog.clear()

assert main(["status", "alice"]) == 0
assert "modified: alice" in caplog.text
assert "modified: bob" not in caplog.text

0 comments on commit e29f99d

Please sign in to comment.