Skip to content

Commit

Permalink
Updating the order in which hooks are being executed
Browse files Browse the repository at this point in the history
  • Loading branch information
anibalinn committed Sep 4, 2024
1 parent 3d496be commit 3cbde90
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions behavex/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,44 +36,44 @@ def extend_behave_hooks():
def run_hook(self, name, context, *args):
if name == 'before_all':
# noinspection PyUnresolvedReferences
behavex_env.before_all(context)
behave_run_hook(self, name, context, *args)
behavex_env.before_all(context)
elif name == 'before_feature':
# noinspection PyUnresolvedReferences
behavex_env.before_feature(context, *args)
behave_run_hook(self, name, context, *args)
behavex_env.before_feature(context, *args)
elif name == 'before_scenario':
# noinspection PyUnresolvedReferences
behavex_env.before_scenario(context, *args)
behave_run_hook(self, name, context, *args)
behavex_env.before_scenario(context, *args)
elif name == 'before_step':
# noinspection PyUnresolvedReferences
behavex_env.before_step(context, *args)
behave_run_hook(self, name, context, *args)
behavex_env.before_step(context, *args)
elif name == 'before_tag':
# noinspection PyUnresolvedReferences
behavex_env.before_tag(context, *args)
behave_run_hook(self, name, context, *args)
behavex_env.before_tag(context, *args)
elif name == 'after_tag':
# noinspection PyUnresolvedReferences
behave_run_hook(self, name, context, *args)
behavex_env.after_tag(context, *args)
behave_run_hook(self, name, context, *args)
elif name == 'after_step':
# noinspection PyUnresolvedReferences
behave_run_hook(self, name, context, *args)
behavex_env.after_step(context, *args)
behave_run_hook(self, name, context, *args)
elif name == 'after_scenario':
# noinspection PyUnresolvedReferences
behave_run_hook(self, name, context, *args)
behavex_env.after_scenario(context, *args)
behave_run_hook(self, name, context, *args)
elif name == 'after_feature':
# noinspection PyUnresolvedReferences
behave_run_hook(self, name, context, *args)
behavex_env.after_feature(context, *args)
behave_run_hook(self, name, context, *args)
elif name == 'after_all':
# noinspection PyUnresolvedReferences
behave_run_hook(self, name, context, *args)
behavex_env.after_all(context, *args)
behave_run_hook(self, name, context, *args)
else:
# noinspection PyUnresolvedReferences
behave_run_hook(self, name, context, *args)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name='behavex',
version='4.0.2rc1',
version='4.0.2rc2',
license="MIT",
platforms=['any'],
python_requires='>=3.5',
Expand Down

0 comments on commit 3cbde90

Please sign in to comment.