Loading tests/conftest.py +11 −0 Original line number Original line Diff line number Diff line Loading @@ -446,6 +446,17 @@ def test_info(request): if hasattr(request, "error"): if hasattr(request, "error"): pytest.fail(request.error) pytest.fail(request.error) @pytest.hookimpl(hookwrapper=True) def pytest_runtest_makereport(item, call): # Use hook to catch exceptions outcome = yield report = outcome.get_result() test_info = item.funcargs.get("test_info", None) if call.excinfo is not None and report.when == "call": # Capture exception in test_info test_info.error = str(call.excinfo.value) @pytest.fixture(scope="session") @pytest.fixture(scope="session") def split_comparison(request): def split_comparison(request): Loading Loading
tests/conftest.py +11 −0 Original line number Original line Diff line number Diff line Loading @@ -446,6 +446,17 @@ def test_info(request): if hasattr(request, "error"): if hasattr(request, "error"): pytest.fail(request.error) pytest.fail(request.error) @pytest.hookimpl(hookwrapper=True) def pytest_runtest_makereport(item, call): # Use hook to catch exceptions outcome = yield report = outcome.get_result() test_info = item.funcargs.get("test_info", None) if call.excinfo is not None and report.when == "call": # Capture exception in test_info test_info.error = str(call.excinfo.value) @pytest.fixture(scope="session") @pytest.fixture(scope="session") def split_comparison(request): def split_comparison(request): Loading