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
16 changes: 8 additions & 8 deletions src/pytest_bdd/templates/test.py.mak
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<%
feature_paths = sorted(set(f.rel_filename for f in features))
%>\
Comment on lines +1 to +3
Copy link
Contributor

Choose a reason for hiding this comment

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

this should go right before line 14

% if features:
"""${ features[0].name or features[0].rel_filename } feature tests."""

from pytest_bdd import (
given,
scenario,
scenarios,
then,
when,
)


% endif
% for scenario in sorted(scenarios, key=lambda scenario: scenario.name):
@scenario('${scenario.feature.rel_filename}', ${ make_string_literal(scenario.name)})
def test_${ make_python_name(scenario.name)}():
${make_python_docstring(scenario.name)}
% for feature_path in feature_paths:
scenarios('${feature_path}')
% endfor


% endfor
% endif
% for step in steps:
@${step.type}(${ make_string_literal(step.name)})
def _():
Expand Down
Loading