diff --git a/toolium/behave/env_utils.py b/toolium/behave/env_utils.py index dc07b2cc..fd68474a 100644 --- a/toolium/behave/env_utils.py +++ b/toolium/behave/env_utils.py @@ -303,7 +303,7 @@ def execute_after_feature_steps(self, context): if scenario.should_run(context.config): self.fail_first_step_precondition_exception(scenario, error_message) if len(scenario.background_steps) > 0: - context.logger.warn(f'Background from scenario status udpated to fail') + context.logger.warn('Background from scenario status udpated to fail') raise Exception(f'Before feature steps have failed: {error_message}') def fail_first_step_precondition_exception(self, scenario, error_message): diff --git a/toolium/test/behave/test_env_utils.py b/toolium/test/behave/test_env_utils.py index 8ec23da1..9a322850 100644 --- a/toolium/test/behave/test_env_utils.py +++ b/toolium/test/behave/test_env_utils.py @@ -222,7 +222,8 @@ def test_execute_after_feature_steps_failed_before_feature(context, dyn_env): assert dyn_env.before_error_message is None context.execute_steps.assert_called_with('Given after feature step') context.feature.reset.assert_called_once_with() - dyn_env.fail_first_step_precondition_exception.assert_called_once_with(context.scenario, 'Exception in before feature step') + dyn_env.fail_first_step_precondition_exception.assert_called_once_with( + context.scenario, 'Exception in before feature step') def test_execute_after_feature_steps_failed_actions_failed_before_feature(context, dyn_env): @@ -241,7 +242,8 @@ def test_execute_after_feature_steps_failed_actions_failed_before_feature(contex assert dyn_env.before_error_message is None context.execute_steps.assert_called_with('Given after feature step') context.feature.reset.assert_called_once_with() - dyn_env.fail_first_step_precondition_exception.assert_called_once_with(context.scenario, 'Exception in before feature step') + dyn_env.fail_first_step_precondition_exception.assert_called_once_with( + context.scenario, 'Exception in before feature step') def test_fail_first_step_precondition_exception(dyn_env):