def before_scenario(context, arg): with open(test_log_file, 'w') as f: f.write('') if arg.location.filename not in SELF_CONNECTING_FEATURES: run_cli(context) wait_prompt(context) if os.path.exists(MY_CNF_PATH): shutil.move(MY_CNF_PATH, MY_CNF_BACKUP_PATH) if os.path.exists(MYLOGIN_CNF_PATH): shutil.move(MYLOGIN_CNF_PATH, MYLOGIN_CNF_BACKUP_PATH)
def before_scenario(context, scenario): if scenario.name == 'list databases': # not using the cli for that return wrappers.run_cli(context) wrappers.wait_prompt(context)
def before_scenario(context, _): run_cli(context) wait_prompt(context)
def before_scenario(context, _): with open(test_log_file, 'w') as f: f.write('') run_cli(context) wait_prompt(context)