fixup! fixes

This commit is contained in:
Dani Hodovic
2019-12-06 21:55:54 +01:00
parent d59bceb71a
commit 29b34bacc2
2 changed files with 4 additions and 7 deletions
+2 -1
View File
@@ -78,7 +78,8 @@ def get(url, path, out=None, rev=None):
is_not_cached = output and not output.use_cache
if is_git_file or is_not_cached:
return _copy_git_file(repo, path, out, url)
_copy_git_file(repo, path, out, url)
return
if output_error:
raise OutputNotFoundError(path)
+2 -6
View File
@@ -151,12 +151,8 @@ def test_fails_with_files_outside_repo(erepo):
def test_fails_with_non_existing_files(erepo):
fname = "file_does_not_exist"
err = "The path '{}' does not exist in the target repository '{}'".format(
fname, erepo.root_dir
)
with pytest.raises(PathOutsideRepoError, match=err):
Repo.get(erepo.root_dir, fname)
with pytest.raises(PathOutsideRepoError):
Repo.get(erepo.root_dir, "file_does_not_exist")
@pytest.mark.parametrize("dname", [".", "dir", "dir/subdir"])