mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-04 23:09:44 +01:00
20 lines
510 B
Python
20 lines
510 B
Python
import pytest
|
|
|
|
from dvc.tree.base import BaseTree, 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(BaseTree, "REQUIRES", requires)
|
|
mocker.patch("dvc.utils.pkg.PKG", pkg)
|
|
with pytest.raises(RemoteMissingDepsError, match=msg):
|
|
BaseTree(None, {})
|