Generated step files should raise NotImplementedError

This commit is contained in:
Alessio Bogon 2019-02-17 18:08:38 +01:00
parent 3fedb8f16a
commit eded49a2ae
3 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,11 @@
Changelog
=========
Unreleased
----------
- Step definitions generated by `pytest-bdd generate` will now `raise NotImplementedError` by default.
3.0.2
------

View File

@ -22,6 +22,7 @@ def test_${ make_python_name(scenario.name)}():
@${step.type}('${step.name}')
def ${ make_python_name(step.name)}():
"""${step.name}."""
raise NotImplementedError
% if not loop.last:

View File

@ -33,20 +33,24 @@ def test_generate(monkeypatch, capsys):
@given('1 have a fixture (appends 1 to a list) in reuse syntax')
def have_a_fixture_appends_1_to_a_list_in_reuse_syntax():
"""1 have a fixture (appends 1 to a list) in reuse syntax."""
raise NotImplementedError
@given('I have an empty list')
def i_have_an_empty_list():
"""I have an empty list."""
raise NotImplementedError
@when('I use this fixture')
def i_use_this_fixture():
"""I use this fixture."""
raise NotImplementedError
@then('my list should be [1]')
def my_list_should_be_1():
"""my list should be [1]."""
raise NotImplementedError
'''[1:].replace(u"'", u"'"))