Files
dvc/tests/unit/dependency/test_params.py
T
65d22c7dbd Restyle #3393 introduce hyper parameters and config (#3516)
* Work in progress

* added file parsing and name validation + adjust schema

* Exceptions on bad input

* Support multiple parameters

* Support multi 's in
Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!

* Restyled by black

Co-authored-by: elgehelge <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
2020-03-20 00:53:41 +02:00

19 lines
578 B
Python

import mock
from dvc.dependency import DependencyPARAMS
from dvc.stage import Stage
from tests.basic_env import TestDvc
class TestDependencyPARAM(TestDvc):
def test_from_list(self):
stage = Stage(self.dvc)
deps = DependencyPARAMS.from_list(
stage, ["foo", "bar,baz", "a_file:qux"]
)
assert len(deps) == 2
assert deps[0].def_path == "a_file"
assert deps[0].param_names == ["qux"]
assert deps[1].def_path == DependencyPARAMS.DEFAULT_PARAMS_FILE
assert deps[1].param_names == ["bar", "baz", "foo"]