log test exception as soon as possible to make logs better
issue:DEVTOOLS-5100
@@ -471,6 +471,8 @@ def pytest_runtest_makereport(item, call):
longrepr = item._repr_failure_py(excinfo, style=item.config.option.tbstyle)
for rwhen, key, content in item._report_sections:
sections.append(("Captured std%s %s" % (key, rwhen), content))
+ if outcome == "failed":
+ yatest_logger.error(longrepr)
return _pytest.runner.TestReport(item.nodeid, item.location, keywords, outcome, longrepr, when, sections, duration)
def logreport(report, result):
