Debian Codegraph @

issue.features/issue0453.feature

raw
1 @issue
2 @unicode
3 Feature: Issue #453 -- Unicode output problem when Exception is raised in step
4
5 . Either Exception text (as summary) or traceback python line shows
6 . special characters incorrectly.
7 .
8 . Result (of failed step):
9 . File "features/steps/steps.py", line 8, in foo
10 . raise Exception(u"по ����ки") <-- This is not
11 . Exception: по русски <-- This is OK
12
13
14 Scenario:
15 Given a new working directory
16 And a file named "features/steps/problematic_steps.py" with:
17 """
18 # -*- coding: UTF-8 -*-
19 from behave import step
20
21 @step(u'an exception with special chars is raised')
22 def step_exception_raised(context):
23 raise Exception(u"по русски")
24 """
25 And a file named "features/syndrome.feature" with:
26 """
27 Feature:
28 Scenario:
29 Given an exception with special chars is raised
30 """
31 When I run "behave -f plain features/syndrome.feature"
32 Then it should fail with:
33 """
34 Scenario:
35 Given an exception with special chars is raised ... failed
36 """
37 And the command output should contain:
38 """
39 File "features/steps/problematic_steps.py", line 6, in step_exception_raised
40 raise Exception(u"по русски")
41 Exception: по русски
42 """