mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-06 16:26:13 +02:00
Address code review
yield -> return
remove needless copy
adjust spacing
re-inline args return
reset packaging info to e6c0a16342
revert package version for this PR
This commit is contained in:
parent
0a2305f397
commit
21c244ec1a
5 changed files with 98 additions and 104 deletions
|
@ -11,7 +11,7 @@ def minimal_config():
|
|||
"editor": "vim",
|
||||
"journals": {"default": "/tmp/journals/journal.jrnl"},
|
||||
}
|
||||
yield cfg
|
||||
return cfg
|
||||
|
||||
|
||||
def test_apply_override(minimal_config):
|
||||
|
@ -21,9 +21,9 @@ def test_apply_override(minimal_config):
|
|||
|
||||
|
||||
def test_override_dot_notation(minimal_config):
|
||||
cfg = minimal_config.copy()
|
||||
overrides = [{"colors.body": "blue"}]
|
||||
cfg = apply_overrides(overrides=overrides, base_config=cfg)
|
||||
|
||||
cfg = apply_overrides(overrides=overrides, base_config=minimal_config)
|
||||
assert cfg["colors"] == {"body": "blue", "date": "green"}
|
||||
|
||||
|
||||
|
@ -34,7 +34,7 @@ def test_multiple_overrides(minimal_config):
|
|||
{"journals.burner": "/tmp/journals/burner.jrnl"},
|
||||
] # as returned by parse_args, saved in parser.config_override
|
||||
|
||||
cfg = apply_overrides(overrides, minimal_config.copy())
|
||||
cfg = apply_overrides(overrides, minimal_config)
|
||||
assert cfg["editor"] == "nano"
|
||||
assert cfg["colors"]["title"] == "magenta"
|
||||
assert "burner" in cfg["journals"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue