mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-07 00:36:13 +02:00
Create tests and steps for temporary filename suffix
This commit is contained in:
parent
31ada29a37
commit
4bbd2fe53b
4 changed files with 37 additions and 0 deletions
|
@ -248,6 +248,15 @@ def contains_editor_file(context, method, text=""):
|
|||
assert False, f"Method '{method}' not supported"
|
||||
|
||||
|
||||
@then('the temporary filename suffix should be "{suffix}"')
|
||||
def extension_editor_file(context, suffix):
|
||||
filename = Path(context.editor_file["name"]).name
|
||||
delimiter = "-" if "-" in filename else "."
|
||||
file_suffix = delimiter + filename.split(delimiter)[-1]
|
||||
print(file_suffix, suffix)
|
||||
assert file_suffix == suffix
|
||||
|
||||
|
||||
def _mock_getpass(inputs):
|
||||
def prompt_return(prompt=""):
|
||||
if type(inputs) == str:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue