mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-04 15:36:14 +02:00
refactor recursive code
This commit is contained in:
parent
d348dbd55e
commit
9540d34964
2 changed files with 21 additions and 8 deletions
|
@ -32,3 +32,9 @@ def test_recursive_override(minimal_config):
|
|||
cfg = {"colors": {"body": "red", "title": "green"}}
|
||||
cfg = recursively_apply(cfg, ["colors", "body"], "blue")
|
||||
assert cfg["colors"]["body"] == "blue"
|
||||
|
||||
|
||||
def test_get_config_node(minimal_config):
|
||||
assert len(minimal_config.keys()) == 3
|
||||
assert _get_config_node(minimal_config, "editor") == "vim"
|
||||
assert _get_config_node(minimal_config, "display_format") == None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue