| 1 |
@issue |
| 2 |
Feature: Issue #80: source file names not properly printed with python3 |
| 3 |
|
| 4 |
. $ behave -f pretty example/example.feature |
| 5 |
. Scenario: run a simple test # example/example.feature:3 |
| 6 |
. Given we have behave installed # <string>:3 |
| 7 |
. When we implement a test # <string>:7 |
| 8 |
. Then behave will test it for us! # <string>:11 |
| 9 |
|
| 10 |
|
| 11 |
Background: Test Setup |
| 12 |
Given a new working directory |
| 13 |
And a file named "features/steps/steps.py" with: |
| 14 |
""" |
| 15 |
from behave import given, when, then |
| 16 |
|
| 17 |
@given(u'a step passes') |
| 18 |
def step(context): |
| 19 |
pass |
| 20 |
|
| 21 |
@when(u'a step passes') |
| 22 |
def step(context): |
| 23 |
pass |
| 24 |
|
| 25 |
@then(u'a step passes') |
| 26 |
def step(context): |
| 27 |
pass |
| 28 |
""" |
| 29 |
And a file named "features/basic.feature" with: |
| 30 |
""" |
| 31 |
Feature: |
| 32 |
Scenario: |
| 33 |
Given a step passes |
| 34 |
When a step passes |
| 35 |
Then a step passes |
| 36 |
""" |
| 37 |
|
| 38 |
Scenario: Show step locations |
| 39 |
When I run "behave -c -f pretty --no-timings features/basic.feature" |
| 40 |
Then it should pass |
| 41 |
And the command output should contain: |
| 42 |
""" |
| 43 |
Feature: # features/basic.feature:1 |
| 44 |
Scenario: # features/basic.feature:2 |
| 45 |
Given a step passes # features/steps/steps.py:3 |
| 46 |
When a step passes # features/steps/steps.py:7 |
| 47 |
Then a step passes # features/steps/steps.py:11 |
| 48 |
""" |
| 49 |
And the command output should not contain "# <string>:" |