-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce record_testsuite_property fixture #5205
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_func This 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. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
xunit2
standard 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