We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4677480 commit 8cd49f7Copy full SHA for 8cd49f7
pytest_github_actions_annotate_failures/plugin.py
@@ -57,12 +57,14 @@ def pytest_runtest_makereport(item, call):
57
longrepr = report.head_line or item.name
58
59
# get the error message and line number from the actual error
60
- try:
+ if hasattr(report.longrepr, "reprcrash"):
61
longrepr += "\n\n" + report.longrepr.reprcrash.message
62
lineno = report.longrepr.reprcrash.lineno
63
-
64
- except AttributeError:
65
- pass
+ elif isinstance(report.longrepr, tuple):
+ _, lineno, message = report.longrepr
+ longrepr += "\n\n" + message
66
+ elif isinstance(report.longrepr, str):
67
+ longrepr += "\n\n" + report.longrepr
68
69
print(
70
_error_workflow_command(filesystempath, lineno, longrepr), file=sys.stderr
0 commit comments