mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 13:08:31 +02:00
update behave step to be more clear
This commit is contained in:
parent
7368cd61cc
commit
93f383cb78
2 changed files with 8 additions and 12 deletions
|
@ -403,11 +403,9 @@ Feature: Custom formats
|
|||
When we run "jrnl --export yaml -o {cache_dir}" with cache directory "exported_journal"
|
||||
Then cache directory "exported_journal" should contain the files
|
||||
"""
|
||||
[
|
||||
"2020-08-29_entry-the-first.md",
|
||||
"2020-08-31_a-second-entry-in-what-i-hope-to-be-a-long-series.md",
|
||||
"2020-09-24_the-third-entry-finally-after-weeks-without-writing.md"
|
||||
]
|
||||
2020-08-29_entry-the-first.md
|
||||
2020-08-31_a-second-entry-in-what-i-hope-to-be-a-long-series.md
|
||||
2020-09-24_the-third-entry-finally-after-weeks-without-writing.md
|
||||
"""
|
||||
And the content of file "2020-08-29_entry-the-first.md" in cache directory "exported_journal" should be
|
||||
"""
|
||||
|
@ -452,11 +450,9 @@ Feature: Custom formats
|
|||
When we run "jrnl --export yaml -o {cache_dir}" with cache directory "bug768"
|
||||
Then cache directory "bug768" should contain the files
|
||||
"""
|
||||
[
|
||||
"2020-08-29_entry-the-first.md",
|
||||
"2020-08-31_a-second-entry-in-what-i-hope-to-be-a-long-series.md",
|
||||
"2020-09-24_the-third-entry-finally-after-weeks-without-writing.md"
|
||||
]
|
||||
2020-08-29_entry-the-first.md
|
||||
2020-08-31_a-second-entry-in-what-i-hope-to-be-a-long-series.md
|
||||
2020-09-24_the-third-entry-finally-after-weeks-without-writing.md
|
||||
"""
|
||||
And the content of file "2020-09-24_the-third-entry-finally-after-weeks-without-writing.md" in cache directory "bug768" should be
|
||||
"""
|
||||
|
|
|
@ -127,12 +127,12 @@ def create_directory(context, dir_name):
|
|||
@then(
|
||||
'cache directory "{dir_name}" should contain the files {expected_files_json_list}'
|
||||
)
|
||||
def assert_dir_contains_files(context, dir_name, expected_files_json_list="[]"):
|
||||
def assert_dir_contains_files(context, dir_name, expected_files_json_list=""):
|
||||
working_dir = os.path.join("features", "cache", dir_name)
|
||||
actual_files = os.listdir(working_dir)
|
||||
|
||||
expected_files = context.text or expected_files_json_list
|
||||
expected_files = json.loads(expected_files)
|
||||
expected_files = expected_files.split("\n")
|
||||
|
||||
# sort to deal with inconsistent default file ordering on different OS's
|
||||
actual_files.sort()
|
||||
|
|
Loading…
Add table
Reference in a new issue