Debian Codegraph @

issue.features/issue0449.feature

raw
1 @issue
2 @unicode
3 Feature: Issue #449 -- Unicode output problem when fails with Russion text
4
5 . Either Exception text (as summary) or traceback python line shows
6 . special characters correctly.
7
8 Scenario:
9 Given a new working directory
10 And a file named "features/steps/problematic_steps.py" with:
11 """
12 # -*- coding: UTF-8 -*-
13 # NOTE: Python2 requires encoding to decode special chars correctly.
14 from behave import step
15 from hamcrest.core import assert_that, equal_to
16
17 @step("Russian text")
18 def step_russian_text(stop):
19 assert_that(False, equal_to(True), u"Всё очень плохо") # cyrillic
20 """
21 And a file named "behave.ini" with:
22 """
23 [behave]
24 show_timings = false
25 """
26 And a file named "features/syndrome.feature" with:
27 """
28 Feature:
29 Scenario:
30 Given Russian text
31 """
32 When I run "behave -f plain features/syndrome.feature"
33 Then it should fail with:
34 """
35 Scenario:
36 Given Russian text ... failed
37 Assertion Failed: Всё очень плохо
38 """
39 But the command output should not contain:
40 """
41 Assertion Failed: 'ascii' codec can't encode characters in position
42 """