Skip to content

Commit de303d4

Browse files
test removing a file outside a raw git repo
1 parent f3d234e commit de303d4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/func/test_get.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ def test_absolute_file_outside_repo(tmp_dir, erepo_dir):
136136
Repo.get(fspath(erepo_dir), "/root/")
137137

138138

139+
def test_absolute_file_outside_git_repo(tmp_dir, erepo_dir):
140+
erepo_dir.scm.repo.index.remove([erepo_dir.dvc.dvc_dir], r=True)
141+
erepo_dir.scm.commit("remove dvc")
142+
143+
with pytest.raises(PathMissingError):
144+
Repo.get(fspath(erepo_dir), "/root/")
145+
146+
139147
def test_unknown_path(tmp_dir, erepo_dir):
140148
with pytest.raises(PathMissingError):
141149
Repo.get(fspath(erepo_dir), "a_non_existing_file")

0 commit comments

Comments
 (0)