Skip to content
Open
Changes from all 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/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def scenario_status(scenario):

def scenario_status_details(scenario):
for step in scenario.all_steps:
if step_status(step) != 'passed':
if step.exception or step.error_message or step_status(step) == 'undefined':
return step_status_details(step)


Expand Down Expand Up @@ -120,11 +120,14 @@ def step_status_details(result):
result.exc_traceback)
return StatusDetails(message=format_exception(type(result.exception), result.exception), trace=trace)

elif result.status == 'undefined':
if result.status == 'undefined':
message = '\nYou can implement step definitions for undefined steps with these snippets:\n\n'
message += make_undefined_step_snippet(result)
return StatusDetails(message=message)

if result.error_message:
return StatusDetails(message=result.error_message)


def step_table(step):
table = [','.join(step.table.headings)]
Expand Down