From bebe1b9d9d616451a7b6d0d0358e169cf4f844ae Mon Sep 17 00:00:00 2001 From: = Date: Fri, 29 May 2020 17:15:15 -0400 Subject: [PATCH] black --- features/environment.py | 4 +++- features/steps/core.py | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/features/environment.py b/features/environment.py index e8a7f4b7..bac273cd 100644 --- a/features/environment.py +++ b/features/environment.py @@ -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() diff --git a/features/steps/core.py b/features/steps/core.py index 82161e58..3cefd25a 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -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=""):