fix(pull): normalize dependency path (#10446)

Co-authored-by: Saugat Pachhai (सौगात) <[email protected]>
This commit is contained in:
George Kussumoto
2024-06-03 16:43:43 +05:45
committed by GitHub
co-authored by Saugat Pachhai
parent b69b368ffe
commit 0e38ccc031
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -305,11 +305,12 @@ def test_cache_type_is_properly_overridden(tmp_dir, scm, dvc, erepo_dir):
assert scm.is_ignored("foo_imported")
def test_pull_imported_directory_stage(tmp_dir, dvc, erepo_dir):
@pytest.mark.parametrize("dirpath", ["dir", "dir/"])
def test_pull_imported_directory_stage(tmp_dir, dvc, erepo_dir, dirpath):
with erepo_dir.chdir():
erepo_dir.dvc_gen({"dir": {"foo": "foo content"}}, commit="create dir")
dvc.imp(os.fspath(erepo_dir), "dir", "dir_imported")
stage = dvc.imp(os.fspath(erepo_dir), dirpath, "dir_imported")
remove("dir_imported")
dvc.cache.local.clear()
@@ -317,6 +318,7 @@ def test_pull_imported_directory_stage(tmp_dir, dvc, erepo_dir):
dvc.pull(["dir_imported.dvc"])
assert (tmp_dir / "dir_imported").read_text() == {"foo": "foo content"}
assert stage.deps[0].fs_path == "dir"
def test_pull_wildcard_imported_directory_stage(tmp_dir, dvc, erepo_dir):