File tree Expand file tree Collapse file tree 3 files changed +24
-5
lines changed Expand file tree Collapse file tree 3 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+
13import allure
24from behave import given
35
@@ -26,3 +28,9 @@ def step_impl(*args, **kwargs):
2628@given (u'{what} broken step {where}' )
2729def step_impl (* args , ** kwargs ):
2830 raise ZeroDivisionError ()
31+
32+
33+ @given (u'всегда будет <это>' )
34+ @given (u'всегда буду я' )
35+ def step_impl (* args , ** kwargs ):
36+ pass
Original file line number Diff line number Diff line change @@ -2,10 +2,20 @@ Feature: Language
22 Scenario : Use russian
33 Given feature definition ru
44 """
5- Функционал: Язык
5+ Функционал: Юникод
66
7- Сценарий: На русском
8- Допустим passed step
7+ Структура сценария: Солнечный круг, небо вокруг
8+ Пусть всегда будет <это>
9+ Пусть всегда буду я
10+ Примеры:
11+ | это |
12+ | солнце |
13+ | небо |
14+ | мама |
915 """
1016 When I run behave with allure formatter with options "--lang ru"
11- Then allure report has a scenario with name "На русском"
17+ Then allure report has a scenario with name "Солнечный круг, небо вокруг"
18+ And scenario contains step "Пусть всегда будет солнце"
19+ And scenario contains step "Пусть всегда будет небо"
20+ And scenario contains step "Пусть всегда будет мама"
21+ And scenario contains step "Пусть всегда буду я"
Original file line number Diff line number Diff line change 44from allure_commons .model2 import Status , Parameter , Label
55from allure_commons .model2 import StatusDetails
66from allure_commons .utils import md5
7+ from allure_commons .utils import represent
78import traceback
89
910STATUS = {
@@ -86,7 +87,7 @@ def step_status(result):
8687
8788def step_status_details (result ):
8889 if result .exception :
89- message = u',' .join (map (str , result .exception .args ))
90+ message = u',' .join (map (represent , result .exception .args ))
9091 message = u'{name}: {message}' .format (name = result .exception .__class__ .__name__ , message = message )
9192 trace = u'\n ' .join (traceback .format_tb (result .exc_traceback )) if result .exc_traceback else None
9293 return StatusDetails (message = message , trace = trace )
You can’t perform that action at this time.
0 commit comments