From a53846953c1e1353ec19fca1caa2d125079de9e5 Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Fri, 29 Nov 2019 10:55:47 +0100 Subject: [PATCH] Use TestRun.makereport() Signed-off-by: Robert Baldyga --- test/functional/test-framework | 2 +- test/functional/tests/conftest.py | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/test/functional/test-framework b/test/functional/test-framework index 1c075f0..0910d7f 160000 --- a/test/functional/test-framework +++ b/test/functional/test-framework @@ -1 +1 @@ -Subproject commit 1c075f00dd6b02e9c563b10d35dc497a61c59225 +Subproject commit 0910d7f45e9f9ae05b0cf4b2fc1e802269b7f3ce diff --git a/test/functional/tests/conftest.py b/test/functional/tests/conftest.py index 9dd559a..520fba1 100644 --- a/test/functional/tests/conftest.py +++ b/test/functional/tests/conftest.py @@ -97,16 +97,7 @@ def pytest_runtest_setup(item): @pytest.hookimpl(tryfirst=True, hookwrapper=True) def pytest_runtest_makereport(item, call): res = (yield).get_result() - - TestRun.outcome = res.outcome - - from _pytest.outcomes import Failed - if res.when == "call" and res.failed: - msg = f"{call.excinfo.type.__name__}: {call.excinfo.value}" - if call.excinfo.type is Failed: - TestRun.LOGGER.error(msg) - else: - TestRun.LOGGER.exception(msg) + TestRun.makereport(item, call, res) def pytest_runtest_teardown():