mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-12-02 23:10:25 +01:00
output: check push in get_used_objs
This commit is contained in:
committed by
Peter Rowlands (변기호)
parent
b550c5e625
commit
6e02dddabd
@@ -51,3 +51,16 @@ def test_from_gitfs_when_pwd_not_in_root(
|
||||
|
||||
with wdir.chdir():
|
||||
assert dvc.used_objs([target], revs=[scm.get_rev()])
|
||||
|
||||
|
||||
def test_used_objs_push(tmp_dir, scm, dvc):
|
||||
stage = tmp_dir.dvc_gen("foo", "foo")[0]
|
||||
hash_info = stage.outs[0].hash_info
|
||||
|
||||
stage.outs[0].can_push = True
|
||||
assert stage.get_used_objs(push=False) == {None: {hash_info}}
|
||||
assert stage.get_used_objs(push=True) == {None: {hash_info}}
|
||||
|
||||
stage.outs[0].can_push = False
|
||||
assert stage.get_used_objs(push=False) == {None: {hash_info}}
|
||||
assert stage.get_used_objs(push=True) == {}
|
||||
|
||||
Reference in New Issue
Block a user