Skip to content
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
6 changes: 4 additions & 2 deletions allure-behave/src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ def get_status(exception):

def step_status_details(result):
if result.exception:
return StatusDetails(message=format_exception(type(result.exception), result.exception),
trace=format_traceback(result.exc_traceback))
# workaround for https://github.com/behave/behave/pull/616
trace = result.exc_traceback if type(result.exc_traceback) == list else format_traceback(result.exc_traceback)
return StatusDetails(message=format_exception(type(result.exception), result.exception), trace=trace)

elif result.status == 'undefined':
message = '\nYou can implement step definitions for undefined steps with these snippets:\n\n'
message += make_undefined_step_snippet(result)
Expand Down
28 changes: 27 additions & 1 deletion allure-behave/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,37 @@ commands=
rm -rf {envtmpdir}/*
behave -f allure_behave.formatter:AllureFormatter -o {envtmpdir}/allrue-result -f pretty {posargs: ./features}

[testenv:xrg-eparallel]
# https://github.com/behave/behave/pull/616
# https://github.com/allure-framework/allure-python/issues/321
passenv = HOME

basepython = python3.6

setenv =
TEST_TMP={envtmpdir}
ALLURE_INDENT_OUTPUT=yep

whitelist_externals = rm

deps=
{distshare}/allure-python-commons-2*.zip
{distshare}/allure-python-commons-test-2*.zip

commands=
pip uninstall -y behave
pip install git+git://github.com/behave/behave.git@refs/pull/616/head
rm -rf {envtmpdir}/*
behave --processes 3 \
--parallel-element feature \
-f allure_behave.formatter:AllureFormatter \
-o {envtmpdir}/allrue-result \
-f pretty {posargs: ./features}

[testenv:behave-master]
passenv = HOME

basepython = python3.5
basepython = python3.6

setenv =
TEST_TMP={envtmpdir}
Expand Down