Skip to content

fix unicode capturing error #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions allure-behave/features/steps/behave_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,11 @@ def hooks_implementations(context):
exec(context.text, context.globals)


# ToDo FixMe
@then(u'skip for python 2')
def crack_the_world(context):
if sys.version_info.major < 3:
exit(0)


@when(u'I run behave with allure formatter')
@when(u'I run behave with allure formatter with options "{args}"')
def run_behave_with_allure(context, **kwargs):
def run(context, **kwargs):
cmd_args = '-v -f allure_behave.formatter:AllureFormatter -f pretty'
cmd_args = '-f allure_behave.formatter:AllureFormatter'
cmd = '{options} {cmd}'.format(cmd=cmd_args, options=kwargs.get('args', ''))
config = Configuration(command_args=cmd)

Expand Down
1 change: 0 additions & 1 deletion allure-behave/features/unicode.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Feature: Language
| небо |
| мама |
"""
Then skip for python 2
When I run behave with allure formatter with options "--lang ru"
Then allure report has a scenario with name "Солнечный круг, небо вокруг"
And scenario contains step "Пусть всегда будет солнце"
Expand Down
2 changes: 1 addition & 1 deletion allure-behave/src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def scenario_history_id(scenario):
parts = [scenario.feature.name, scenario.name]
if scenario._row:
row = scenario._row
parts.extend(['{name}={value}'.format(name=name, value=value) for name, value in zip(row.headings, row.cells)])
parts.extend([u'{name}={value}'.format(name=name, value=value) for name, value in zip(row.headings, row.cells)])
return md5(*parts)


Expand Down