| 1 |
@issue |
| 2 |
@not_reproducible |
| 3 |
Feature: Issue #139: Wrong steps seem to be executed when using --wip |
| 4 |
|
| 5 |
. RELATED-TO: issue #35 |
| 6 |
. behave --format=plain --tags @one" seems to execute right scenario w/ wrong steps |
| 7 |
. |
| 8 |
. If you have a feature file with two scenarios where the second is tagged |
| 9 |
. with @wip, running behave -w will output step names from the first scenario. |
| 10 |
. It does seem to run the correct code for the steps. |
| 11 |
|
| 12 |
|
| 13 |
Scenario: |
| 14 |
Given a new working directory |
| 15 |
And a file named "features/steps/steps.py" with: |
| 16 |
""" |
| 17 |
from behave import given, when, then, step |
| 18 |
|
| 19 |
@step('a step passes') |
| 20 |
def step_passes(context): |
| 21 |
pass |
| 22 |
|
| 23 |
@step('a step fails') |
| 24 |
def step_fails(context): |
| 25 |
assert False, "XFAIL" |
| 26 |
|
| 27 |
@when('I run a test step') |
| 28 |
def step_impl(context): |
| 29 |
pass |
| 30 |
|
| 31 |
@when('I run some other test step') |
| 32 |
def step_impl(context): |
| 33 |
pass |
| 34 |
|
| 35 |
@then('I should not see a failure here') |
| 36 |
def step_impl(context): |
| 37 |
pass |
| 38 |
""" |
| 39 |
And a file named "features/issue0139_example.feature" with: |
| 40 |
""" |
| 41 |
Feature: Bug in wip/behave -w |
| 42 |
|
| 43 |
Scenario: This is strange |
| 44 |
Given a step passes |
| 45 |
When a step passes |
| 46 |
Then a step fails |
| 47 |
|
| 48 |
@wip |
| 49 |
Scenario: Demonstrate bug |
| 50 |
When I run a test step |
| 51 |
And I run some other test step |
| 52 |
Then I should not see a failure here |
| 53 |
""" |
| 54 |
When I run "behave -w -f plain -T features/issue0139_example.feature" |
| 55 |
Then it should pass |
| 56 |
And the command output should contain: |
| 57 |
""" |
| 58 |
Feature: Bug in wip/behave -w |
| 59 |
Scenario: This is strange |
| 60 |
Scenario: Demonstrate bug |
| 61 |
When I run a test step ... passed |
| 62 |
And I run some other test step ... passed |
| 63 |
Then I should not see a failure here ... passed |
| 64 |
""" |
| 65 |
|
| 66 |
|
| 67 |
|