1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
@issue
Feature: Issue #159: output stream is wrapped twice in the codecs.StreamWriter
@setup
Scenario: Feature Setup
Given a new working directory
And a file named "features/steps/steps.py" with:
"""
# -*- coding: utf-8 -*-
from behave import step
@step('firstname is "{name}"')
def step_impl(context, name):
pass
@step(u'full name is Loïc "{name}"')
def step_impl(context, name):
pass
"""
Scenario: Single feature, pass (a)
Given a file named "features/issue159_stream_writer.feature" with:
"""
Feature:
Scenario:
When firstname is "Loïc"
"""
When I run "behave -f plain features/"
Then it should pass
Scenario: Single feature, pass (b)
Given a file named "features/issue159_stream_writer.feature" with:
"""
Feature:
Scenario:
When full name is Loïc "Dupont"
"""
When I run "behave -f plain features/"
Then it should pass
Scenario: Two features, FAIL (a)
Given a file named "features/issue159_stream_writer.feature" with:
"""
Feature:
Scenario:
When full name is Loïc "Dupont"
"""
And a file named "features/issue159_stream_writer_again.feature" with:
"""
Feature:
Scenario:
When full name is Loïc "Dupond"
"""
When I run "behave -f plain features/"
Then it should pass
Scenario: Two features, FAIL (b)
Given a file named "features/issue159_stream_writer.feature" with:
"""
Feature:
Scenario:
When firstname is "Loïc"
"""
And a file named "features/issue159_stream_writer_again.feature" with:
"""
Feature:
Scenario:
When firstname is "Loïc"
"""
When I run "behave -f plain features/"
Then it should pass
|