mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 13:36:14 +02:00
Initial support for DayOne integration testing
This commit is contained in:
parent
1a31c10ca7
commit
0fa981357e
7 changed files with 176 additions and 1 deletions
|
@ -18,7 +18,11 @@ def before_scenario(context, scenario):
|
|||
if not os.path.exists(working_dir):
|
||||
os.mkdir(working_dir)
|
||||
for filename in os.listdir(original):
|
||||
shutil.copy2(os.path.join(original, filename), working_dir)
|
||||
source = os.path.join(original, filename)
|
||||
if os.path.isdir(source):
|
||||
shutil.copytree(source, os.path.join(working_dir, filename))
|
||||
else:
|
||||
shutil.copy2(source, working_dir)
|
||||
|
||||
def after_scenario(context, scenario):
|
||||
"""After each scenario, restore all test data and remove working_dirs."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue