-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
topic: reportingrelated to terminal output and user-facing messages and errorsrelated to terminal output and user-facing messages and errors
Description
Hey!
During teardown, it doesn't seem to be possible to include an additional report section.
import pytest
@pytest.yield_fixture
def fixture1(request):
request.node.add_report_section('setup', 'hello', 'during setup')
try:
yield
finally:
request.node.add_report_section('teardown', 'hello', 'during teardown')
def test_simple(fixture1):
assert False(try/finally not needed)
I get the section for setup, but not for teardown. It seems that the "makereport" hook is done before teardown. Using a finalizer instead of a yield_fixture gives the same result.
py.test 2.8 and python 3.5.1.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
topic: reportingrelated to terminal output and user-facing messages and errorsrelated to terminal output and user-facing messages and errors