test removing a file outside a raw git repo

This commit is contained in:
Fábio Santos
2020-01-10 23:30:18 +00:00
parent f3d234ec9c
commit de303d45ba
+8
View File
@@ -136,6 +136,14 @@ def test_absolute_file_outside_repo(tmp_dir, erepo_dir):
Repo.get(fspath(erepo_dir), "/root/")
def test_absolute_file_outside_git_repo(tmp_dir, erepo_dir):
erepo_dir.scm.repo.index.remove([erepo_dir.dvc.dvc_dir], r=True)
erepo_dir.scm.commit("remove dvc")
with pytest.raises(PathMissingError):
Repo.get(fspath(erepo_dir), "/root/")
def test_unknown_path(tmp_dir, erepo_dir):
with pytest.raises(PathMissingError):
Repo.get(fspath(erepo_dir), "a_non_existing_file")