Introduce record_testsuite_property fixture#5205
Conversation
Codecov Report
@@ Coverage Diff @@
## features #5205 +/- ##
============================================
- Coverage 91.49% 91.34% -0.16%
============================================
Files 115 115
Lines 26138 26174 +36
Branches 2578 2580 +2
============================================
- Hits 23915 23908 -7
- Misses 1897 1945 +48
+ Partials 326 321 -5
Continue to review full report at Codecov.
|
|
Any reviewers? I would like to get this out in 4.5 if possible. |
|
Happy to do a review, but I don't fully understand what this is meant to do!
xml = getattr(request.config, "_xml", None)
if xml is None:
def record_func(name, value):
"""noop function in case --junitxml was not passed in the command-line"""
else:
def record_func(name, value):
if not isinstance(name, str):
raise ...
xml.add_global_property(name, value)
return record_funcThis might just be Hypothesis-level nitpicking, but it's what I'm used to - and I can't see any obvious problems if that helps 😄 |
Not at all! All good suggestions. I will get to them later. 👍 |
This exposes the functionality introduced in fa6acdc as a session-scoped fixture. Plugins that want to remain compatible with the `xunit2` standard should use this fixture instead of `record_property`. Fix pytest-dev#5202
b27275e to
73bbff2
Compare
|
@Zac-HD done! Please let me know if you have any other suggestions/comments. 👍 |
Zac-HD
left a comment
There was a problem hiding this comment.
With the caveat that I haven't used the XML reporting feature, this looks good to me 👍
This exposes the functionality introduced in fa6acdc as a session-scoped fixture.
Plugins that want to remain compatible with the
xunit2standard should use this fixture instead of
record_property.Fix #5202
@Zac-HD Hypothesis might want to use this fixture to produce
xunit2-compatible reports according to #5202.cc @danilomendesdias