mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 07:18:27 +01:00
* Implement dvc config --list * Add test for successful CLI exit on --list * Use dvc.utils.flatten, remove parser groups * Move the test
21 lines
622 B
Python
21 lines
622 B
Python
from dvc.command.config import CmdConfig
|
|
|
|
|
|
def test_config_formatter():
|
|
example_config = {
|
|
"section_foo": {"option_bar": True, "option_baz": False},
|
|
"section_foo2": {
|
|
"option_bar2": {"option_baz2": True},
|
|
"option_baz3": {"option_baz4": False},
|
|
},
|
|
"section_foo3": {},
|
|
}
|
|
|
|
config_lines = tuple(CmdConfig._format_config(example_config))
|
|
assert config_lines == (
|
|
"section_foo.option_bar=True",
|
|
"section_foo.option_baz=False",
|
|
"section_foo2.option_bar2.option_baz2=True",
|
|
"section_foo2.option_baz3.option_baz4=False",
|
|
)
|