Skip to content

Commit eded49a

Browse files
committed
Generated step files should raise NotImplementedError
1 parent 3fedb8f commit eded49a

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

CHANGES.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changelog
22
=========
33

4+
Unreleased
5+
----------
6+
7+
- Step definitions generated by `pytest-bdd generate` will now `raise NotImplementedError` by default.
8+
49
3.0.2
510
------
611

pytest_bdd/templates/test.py.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def test_${ make_python_name(scenario.name)}():
2222
@${step.type}('${step.name}')
2323
def ${ make_python_name(step.name)}():
2424
"""${step.name}."""
25+
raise NotImplementedError
2526
% if not loop.last:
2627

2728

tests/scripts/test_generate.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,24 @@ def test_given_and_when_using_the_same_fixture_should_not_evaluate_it_twice():
3333
@given('1 have a fixture (appends 1 to a list) in reuse syntax')
3434
def have_a_fixture_appends_1_to_a_list_in_reuse_syntax():
3535
"""1 have a fixture (appends 1 to a list) in reuse syntax."""
36+
raise NotImplementedError
3637
3738
3839
@given('I have an empty list')
3940
def i_have_an_empty_list():
4041
"""I have an empty list."""
42+
raise NotImplementedError
4143
4244
4345
@when('I use this fixture')
4446
def i_use_this_fixture():
4547
"""I use this fixture."""
48+
raise NotImplementedError
4649
4750
4851
@then('my list should be [1]')
4952
def my_list_should_be_1():
5053
"""my list should be [1]."""
54+
raise NotImplementedError
5155
5256
'''[1:].replace(u"'", u"'"))

0 commit comments

Comments
 (0)