Files
dvc/tests/unit/fs/test_base.py
T
Saugat Pachhai (सौगात) 570e3a5359 dvc.fs: move fs to dvc.objects.fs
Some of the APIs/FileSystems are reimported inside dvc.fs module.
2022-05-16 13:15:19 +03:00

20 lines
501 B
Python

import pytest
from dvc.fs import FileSystem, 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(FileSystem, "REQUIRES", requires)
mocker.patch("dvc.utils.pkg.PKG", pkg)
with pytest.raises(RemoteMissingDepsError, match=msg):
FileSystem()