Skip to content

Commit 73eb936

Browse files
authored
fix unicode capturing error (via allure-framework#135)
1 parent 07afb35 commit 73eb936

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

allure-behave/features/steps/behave_steps.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,11 @@ def hooks_implementations(context):
2323
exec(context.text, context.globals)
2424

2525

26-
# ToDo FixMe
27-
@then(u'skip for python 2')
28-
def crack_the_world(context):
29-
if sys.version_info.major < 3:
30-
exit(0)
31-
32-
3326
@when(u'I run behave with allure formatter')
3427
@when(u'I run behave with allure formatter with options "{args}"')
3528
def run_behave_with_allure(context, **kwargs):
3629
def run(context, **kwargs):
37-
cmd_args = '-v -f allure_behave.formatter:AllureFormatter -f pretty'
30+
cmd_args = '-f allure_behave.formatter:AllureFormatter'
3831
cmd = '{options} {cmd}'.format(cmd=cmd_args, options=kwargs.get('args', ''))
3932
config = Configuration(command_args=cmd)
4033

allure-behave/features/unicode.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Feature: Language
1313
| небо |
1414
| мама |
1515
"""
16-
Then skip for python 2
1716
When I run behave with allure formatter with options "--lang ru"
1817
Then allure report has a scenario with name "Солнечный круг, небо вокруг"
1918
And scenario contains step "Пусть всегда будет солнце"

allure-behave/src/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def scenario_history_id(scenario):
2828
parts = [scenario.feature.name, scenario.name]
2929
if scenario._row:
3030
row = scenario._row
31-
parts.extend(['{name}={value}'.format(name=name, value=value) for name, value in zip(row.headings, row.cells)])
31+
parts.extend([u'{name}={value}'.format(name=name, value=value) for name, value in zip(row.headings, row.cells)])
3232
return md5(*parts)
3333

3434

0 commit comments

Comments
 (0)