From bdef8c4e3aecbeb8a446c6d9fd1f26d7333d7b95 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 7 Jun 2016 08:23:35 +0200 Subject: [PATCH] Fix lint --- tests/end2end/features/conftest.py | 35 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/tests/end2end/features/conftest.py b/tests/end2end/features/conftest.py index 1564d48be..9d1d5c074 100644 --- a/tests/end2end/features/conftest.py +++ b/tests/end2end/features/conftest.py @@ -76,24 +76,25 @@ def pytest_runtest_makereport(item, call): name=report.scenario['feature']['name'], reset=colors['reset'], )) - output.append(" {kw_color}Scenario:{reset} {name} " - "({filename}:{line})".format( - kw_color=colors['keyword'], - name=report.scenario['name'], - filename=report.scenario['feature']['rel_filename'], - line=report.scenario['line_number'], - reset=colors['reset'], - )) - for step in report.scenario['steps']: - output.append(" {kw_color}{keyword}{reset} {color}{name}{reset} " - "({duration:.2f}s)".format( + output.append( + " {kw_color}Scenario:{reset} {name} ({filename}:{line})".format( kw_color=colors['keyword'], - color=colors['failed'] if step['failed'] else colors['passed'], - keyword=step['keyword'], - name=step['name'], - duration=step['duration'], - reset=colors['reset'], - )) + name=report.scenario['name'], + filename=report.scenario['feature']['rel_filename'], + line=report.scenario['line_number'], + reset=colors['reset']) + ) + for step in report.scenario['steps']: + output.append( + " {kw_color}{keyword}{reset} {color}{name}{reset} " + "({duration:.2f}s)".format( + kw_color=colors['keyword'], + color=colors['failed'] if step['failed'] else colors['passed'], + keyword=step['keyword'], + name=step['name'], + duration=step['duration'], + reset=colors['reset']) + ) report.longrepr.addsection("BDD scenario", '\n'.join(output))