Files
dvc/tests/unit/fs/test_base.py
T
Ruslan Kuprieiev 89b40afee7 fs: make constructor closer to fsspec (#5911)
* fs: don't use repo for jobs/hash_jobs

* fs: local: exists: use fsspec's LocalFileSystem

* fs: make constructor comply with fsspec
2021-05-12 22:03:09 +03:00

20 lines
518 B
Python

import pytest
from dvc.fs.base import BaseFileSystem, RemoteMissingDepsError
@pytest.mark.parametrize(
"pkg, msg",
[
(None, "Please report this bug to"),
("pip", "pip install"),
("conda", "conda install"),
],
)
def test_missing_deps(pkg, msg, mocker):
requires = {"missing": "missing"}
mocker.patch.object(BaseFileSystem, "REQUIRES", requires)
mocker.patch("dvc.utils.pkg.PKG", pkg)
with pytest.raises(RemoteMissingDepsError, match=msg):
BaseFileSystem()