The report passed to pytest_runtest_logreport has a different
internal exception representation depending on the --tb option with
which pytest is configured: some of these representations do not
include the traceback frames to allow us to calculate line numbers.
pytest_runtest_makereport, however, has access to the original
ExceptionInfo object when an exception is raised: this commit switches
to using a pytest_runtest_makereport hookwrapper, so we can access the
pytest-generated report as before, but get exception handling
independent of --tb setting.
The
report
passed topytest_runtest_logreport
has a different internal exception representation depending on the--tb
option with whichpytest
is configured: some of these representations do not include the traceback frames to allow us to calculate line numbers.pytest_runtest_makereport
, however, has access to the originalExceptionInfo
object when an exception is raised: this commit switches to using apytest_runtest_makereport
hookwrapper, so we can access the pytest-generated report as before, but get exception handling independent of--tb
setting.Fixes: #28