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
3 changes: 2 additions & 1 deletion pytest_bdd/gherkin_terminal_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,13 @@ def pytest_runtest_logreport(self, report):
self._tw.write(report.scenario['name'], **scenario_markup)
self._tw.write('\n')
for step in report.scenario['steps']:
step_markup = {'red': True} if step["failed"] else {'green': True}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not working for skipped tests because of else statement

if self.config.option.expand:
step_name = self._format_step_name(step['name'], **report.scenario['example_kwargs'])
else:
step_name = step['name']
self._tw.write(' {} {}\n'.format(step['keyword'],
step_name), **scenario_markup)
step_name), **step_markup)
self._tw.write(' ' + word, **word_markup)
self._tw.write('\n\n')
else:
Expand Down