pytest-html
pytest-html copied to clipboard
help in handling error case from report attribute using the pytest-html plugin
i need help in the way pytest_runtest_makereport handles error
pytest_html = item.config.pluginmanager.getplugin("html")
report = outcome.get_result()
extra = getattr(report, "extra", [])
LOG.info(f"Now in test {item.nodeid} {call.when}")
error = hasattrb(report, "waserror")
am unable to get the error variable to true even though i have a error test and have a logger statement when i print call.when in setup/call/teardown. am i missing something here ?
I need more info to help.
Can you show the entire function and what output you do get?
Closing this for lack of interaction. Feel free to re-open.