We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8aac34 commit 1d8da26Copy full SHA for 1d8da26
1 file changed
src/pytest_tap/plugin.py
@@ -216,10 +216,11 @@ def _make_as_raw_yaml_block(report):
216
lines = report.longrepr.reprcrash.message.splitlines(keepends=True)
217
except AttributeError:
218
lines = report.longreprtext.splitlines(keepends=True)
219
- user_properties = getattr(report, "user_properties", [])
220
- return f"""{"\n".join(f"{k}: {v}" for k, v in user_properties)}\
+ res = f"""\
221
message: |
222
{"".join(f" {line}" for line in lines)}
223
severity: {report.outcome}
224
-duration_ms: {report.duration * 1000}
225
-"""
+duration_ms: {report.duration * 1000}"""
+ if hasattr(report, "user_properties"):
+ res += "\n" + "\n".join(f'{k}: {v}' for k, v in report.user_properties)
226
+ return res
0 commit comments