mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-27 23:09:28 +01:00
Implement dvc config --list (#5080)
* Implement dvc config --list * Add test for successful CLI exit on --list * Use dvc.utils.flatten, remove parser groups * Move the test
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
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",
|
||||
)
|
||||
Reference in New Issue
Block a user