INNER CODE UNIT · Python
pytest_runtest_makereport
etchdroid/etchdroid · appium-tests/conftest.py:69
def pytest_runtest_makereport(item, call):
report = yield
if report.when == "call" and report.failed and call.excinfo is not None:
report.longrepr = (
f"{call.excinfo.typename}: {_exception_message(call.excinfo.value)}\n\n"
f"{_repo_frames(call.excinfo.tb)}"
)
# The denoised logcat is written during teardown, so append it then.
item.stash[_CLEAN_REPORT] = report
elif report.when == "teardown":
clean = item.stash.get(_CLEAN_REPORT, None)
if clean is not None:
clean.longrepr = (
f"{clean.longrepr}\n\n"
f"===== denoised app logcat: {item.name} =====\n"
f"{_denoised_logcat(item.name)}"
)