mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 04:58:32 +02:00
remove unused import
This commit is contained in:
parent
c8b737e459
commit
e173e12edf
1 changed files with 5 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
from jrnl import override
|
|
||||||
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
|
||||||
|
@ -20,19 +20,18 @@ def load_config(context, config_file):
|
||||||
context.config_path = os.path.abspath(filepath)
|
context.config_path = os.path.abspath(filepath)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@when("we run jrnl with {args}")
|
@when("we run jrnl with {args}")
|
||||||
def run_command(context, args):
|
def run_command(context, args):
|
||||||
context.args = split_args("%s" % args)
|
context.args = split_args("%s" % args)
|
||||||
context.parser = parse_args(context.args)
|
context.parser = parse_args(context.args)
|
||||||
with open(context.config_path,'r') as f:
|
with open(context.config_path, "r") as f:
|
||||||
cfg = yaml.load(f,Loader=FullLoader)
|
cfg = yaml.load(f, Loader=FullLoader)
|
||||||
context.cfg = cfg
|
context.cfg = cfg
|
||||||
|
|
||||||
|
|
||||||
@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(".")
|
||||||
|
|
||||||
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)
|
||||||
|
|
Loading…
Add table
Reference in a new issue