mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 04:58:32 +02:00
make format
This commit is contained in:
parent
9f8be334fd
commit
27a370ce86
1 changed files with 4 additions and 6 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
from jrnl.jrnl import run
|
from jrnl.jrnl import run
|
||||||
from jrnl.os_compat import split_args
|
from jrnl.os_compat import split_args
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
@ -32,14 +31,13 @@ def run_command(context, args):
|
||||||
@then("the runtime config should have {key_as_dots} set to {override_value}")
|
@then("the runtime config should have {key_as_dots} set to {override_value}")
|
||||||
def config_override(context, key_as_dots: str, override_value: str):
|
def config_override(context, key_as_dots: str, override_value: str):
|
||||||
key_as_vec = key_as_dots.split(".")
|
key_as_vec = key_as_dots.split(".")
|
||||||
expected_call_args_list = [
|
expected_call_args_list = [
|
||||||
(context.cfg, key_as_vec, override_value),
|
(context.cfg, key_as_vec, override_value),
|
||||||
(context.cfg[key_as_vec[0]], key_as_vec[1], override_value)
|
(context.cfg[key_as_vec[0]], key_as_vec[1], override_value),
|
||||||
]
|
]
|
||||||
with open(context.config_path) as f:
|
with open(context.config_path) as f:
|
||||||
loaded_cfg = yaml.load(f, Loader=yaml.FullLoader)
|
loaded_cfg = yaml.load(f, Loader=yaml.FullLoader)
|
||||||
loaded_cfg["journal"] = "features/journals/simple.journal"
|
loaded_cfg["journal"] = "features/journals/simple.journal"
|
||||||
|
|
||||||
|
|
||||||
def _mock_callback(**args):
|
def _mock_callback(**args):
|
||||||
print("callback executed")
|
print("callback executed")
|
||||||
|
|
Loading…
Add table
Reference in a new issue