Skip to content

Commit

Permalink
fix(QAWTO-212): fix flake8 linter messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogarfe committed Jun 28, 2024
1 parent 6afb8b3 commit fe89819
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion toolium/behave/env_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 4 additions & 2 deletions toolium/test/behave/test_env_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand Down

0 comments on commit fe89819

Please sign in to comment.