Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #771 allure-behave formatter crash with behave v1.2.7.dev5 #798

Merged
merged 6 commits into from
Mar 14, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions allure-behave/src/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ def stop_test(self, parent_uuid, uuid, name, context, exc_type, exc_val, exc_tb)
self.stop_scenario(context['scenario'])

def stop_scenario(self, scenario):
should_run = (scenario.should_run_with_tags(self.behave_config.tags) and
scenario.should_run_with_name_select(self.behave_config))
if hasattr(self.behave_config, "tag_expression"): # since behave 1.2.7dev1
should_run = scenario.should_run_with_tags(self.behave_config.tag_expression)
else: # till behave 1.2.6
should_run = scenario.should_run_with_tags(self.behave_config.tags)
should_run &= scenario.should_run_with_name_select(self.behave_config)
ercaronte marked this conversation as resolved.
Show resolved Hide resolved
should_drop_skipped_by_option = scenario.status == 'skipped' and not self.behave_config.show_skipped
should_drop_excluded = self.hide_excluded and (scenario.skip_reason == TEST_PLAN_SKIP_REASON or not should_run)

Expand Down
Loading