pytest_runtest_makereport() gets two arguments, item and call. From item, I can find the funcarg I created for this test, and from call, I can find the exception info (if any):
While hpk42's answer works, __multicall__ is being depreciated.
__multicall__
This achieves the same result though:
@pytest.hookimpl(hookwrapper=True) def pytest_runtest_makereport(item, call): outcome = yield rep = outcome.get_result() setattr(item, "rep_" + rep.when, rep) return rep