Skip to content

Commit 8a732a4

Browse files
author
Cody D'Ambrosio
committed
add user_properties
1 parent 0e6e15b commit 8a732a4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/pytest_tap/plugin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,11 @@ def _make_as_raw_yaml_block(report):
216216
lines = report.longrepr.reprcrash.message.splitlines(keepends=True)
217217
except AttributeError:
218218
lines = report.longreprtext.splitlines(keepends=True)
219+
user_properties = getattr(report, "user_properties", [])
219220
return f"""\
220221
message: |
221222
{"".join(f" {line}" for line in lines)}
222223
severity: {report.outcome}
223224
duration_ms: {report.duration * 1000}
225+
{'\n'.join(f"{k}: {v}" for k, v in user_properties)}
224226
"""

0 commit comments

Comments
 (0)