mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-05 07:56:14 +02:00
Use explicit "given the config exists" for copying config files instead of shoehorning in "given we use the config" twice
This commit is contained in:
parent
31354ba669
commit
51e8606f44
2 changed files with 26 additions and 18 deletions
|
@ -108,6 +108,14 @@ def we_use_the_config(config_file, temp_dir, working_dir):
|
|||
return config_dest
|
||||
|
||||
|
||||
@given(parse('the config "{config_file}" exists'), target_fixture="config_path")
|
||||
@given('the config "<config_file>" exists', target_fixture="config_path")
|
||||
def config_exists(config_file, temp_dir, working_dir):
|
||||
config_source = os.path.join(working_dir, "data", "configs", config_file)
|
||||
config_dest = os.path.join(temp_dir.name, config_file)
|
||||
shutil.copy2(config_source, config_dest)
|
||||
|
||||
|
||||
@given(parse('we use the password "{pw}" if prompted'), target_fixture="password")
|
||||
def use_password_forever(pw):
|
||||
return pw
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue