move: use relpath to find target path

This commit is contained in:
pawel
2019-09-10 14:03:55 +02:00
parent b3e4ff7cba
commit a16dc58ae3
2 changed files with 13 additions and 3 deletions
+10
View File
@@ -200,3 +200,13 @@ def test_move_should_save_stage_info(dvc_repo, repo_dir):
dvc_repo.move(repo_dir.DATA_DIR, "new_name")
assert dvc_repo.status() == {}
def test_should_move_to_dir_on_non_default_stage_file(dvc_repo, repo_dir):
stage_file_name = "stage.dvc"
dvc_repo.add(repo_dir.FOO, fname=stage_file_name)
dvc_repo.move(repo_dir.FOO, repo_dir.DATA_DIR)
assert os.path.exists(os.path.join(repo_dir.DATA_DIR, repo_dir.FOO))