mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 13:36:14 +02:00
[Dayone] re-add tests
c.f. commit 7cbca9f60f
c.f. commit 398283a8db3177b1ae122e5b9d6a9d623cf9106f
[Dayone] Skip failing tests on Travis
Travis sets the timezone to UTC, which causes many tests to fail
This commit is contained in:
parent
e912827396
commit
f9692b1f8d
3 changed files with 121 additions and 0 deletions
|
@ -2,6 +2,14 @@ import shutil
|
|||
import os
|
||||
|
||||
|
||||
def before_feature(context, feature):
|
||||
# add "skip" tag
|
||||
# https://stackoverflow.com/a/42721605/4276230
|
||||
if "skip" in feature.tags:
|
||||
feature.skip("Marked with @skip")
|
||||
return
|
||||
|
||||
|
||||
def before_scenario(context, scenario):
|
||||
"""Before each scenario, backup all config and journal test data."""
|
||||
# Clean up in case something went wrong
|
||||
|
@ -22,6 +30,12 @@ def before_scenario(context, scenario):
|
|||
else:
|
||||
shutil.copy2(source, working_dir)
|
||||
|
||||
# add "skip" tag
|
||||
# https://stackoverflow.com/a/42721605/4276230
|
||||
if "skip" in scenario.effective_tags:
|
||||
scenario.skip("Marked with @skip")
|
||||
return
|
||||
|
||||
|
||||
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