link: use proper exceptions (#6852)

* link: use proper exceptions

* system: use ENOTSUP instead of NotImplementedErrorwq
This commit is contained in:
Ruslan Kuprieiev
2021-10-23 02:38:17 +03:00
committed by GitHub
parent 719e93192f
commit e2d705fd76
5 changed files with 42 additions and 43 deletions
+1 -1
View File
@@ -958,7 +958,7 @@ def test_add_with_cache_link_error(tmp_dir, dvc, mocker, capsys):
mocker.patch(
"dvc.objects.checkout._do_link",
side_effect=DvcException("link failed"),
side_effect=OSError(errno.ENOTSUP, "link failed"),
)
dvc.add("foo")
err = capsys.readouterr()[1]