mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 21:18:32 +02:00
black
This commit is contained in:
parent
c03f0ab2d7
commit
bebe1b9d9d
2 changed files with 9 additions and 4 deletions
|
@ -3,6 +3,8 @@ import shutil
|
|||
import sys
|
||||
|
||||
CWD = os.getcwd()
|
||||
|
||||
|
||||
def clean_all_working_dirs():
|
||||
for folder in ("configs", "journals", "cache"):
|
||||
working_dir = os.path.join("features", folder)
|
||||
|
@ -52,6 +54,6 @@ def before_scenario(context, scenario):
|
|||
|
||||
def after_scenario(context, scenario):
|
||||
"""After each scenario, restore all test data and remove working_dirs."""
|
||||
if os.getcwd()!=CWD:
|
||||
if os.getcwd() != CWD:
|
||||
os.chdir(CWD)
|
||||
clean_all_working_dirs()
|
||||
|
|
|
@ -79,16 +79,19 @@ def set_config(context, config_file):
|
|||
with open(install.CONFIG_FILE_PATH, "a") as cf:
|
||||
cf.write("version: {}".format(__version__))
|
||||
|
||||
@given('there is no config')
|
||||
|
||||
@given("there is no config")
|
||||
def no_config(context):
|
||||
nopath = "features/configs/missingconfig.yaml"
|
||||
install.CONFIG_FILE_PATH = os.path.abspath(nopath)
|
||||
#install.CONFIG_FILE_PATH_FALLBACK = os.path.abspath(nopath)
|
||||
# install.CONFIG_FILE_PATH_FALLBACK = os.path.abspath(nopath)
|
||||
|
||||
|
||||
@when('we change directory to "{path}"')
|
||||
def move_up_dir(context,path):
|
||||
def move_up_dir(context, path):
|
||||
os.chdir(path)
|
||||
|
||||
|
||||
@when('we open the editor and enter "{text}"')
|
||||
@when("we open the editor and enter nothing")
|
||||
def open_editor_and_enter(context, text=""):
|
||||
|
|
Loading…
Add table
Reference in a new issue