-
-
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
Show XFail reason as part of JUnitXML message field #5087
Conversation
Codecov Report
@@ Coverage Diff @@
## features #5087 +/- ##
============================================
+ Coverage 96.09% 96.09% +<.01%
============================================
Files 115 115
Lines 25894 25907 +13
Branches 2560 2561 +1
============================================
+ Hits 24883 24896 +13
Misses 704 704
Partials 307 307
Continue to review full report at Codecov.
|
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.
LGTM, but that's not my area of expertise.
Hi @samueljsb, thanks for the PR! Current <?xml version="1.0" encoding="utf-8"?>
<testsuite errors="0" failures="0" name="pytest" skipped="1" tests="2" time="0.096">
<testcase classname="foo" file="foo.py" line="3" name="test" time="0.001">
<skipped message="expected test failure">xfail for some reason</skipped>
</testcase>
<testcase classname="foo" file="foo.py" line="8" name="test_ok" time="0.001"></testcase>
</testsuite> Your PR generates: <?xml version="1.0" encoding="utf-8"?>
<testsuite errors="0" failures="0" name="pytest" skipped="1" tests="2" time="0.074">
<testcase classname="foo" file="foo.py" line="3" name="test" time="0.002">
<skipped message="xfail for some reason" type="pytest.xfail"></skipped>
</testcase>
<testcase classname="foo" file="foo.py" line="8" name="test_ok" time="0.000"></testcase>
</testsuite> The <xs:element name="skipped">
<xs:complexType mixed="true">
<xs:attribute name="type" type="xs:string"/>
<xs:attribute name="message" type="xs:string"/>
</xs:complexType>
</xs:element> So I think we are good here. 👍 (created #5095 as a follow up btw) |
Hmm although this can be considered a bug-fix, it does change how we produce the XML and might break custom scripts which process the file and expect what pytest already generates. I think we should rebase this to |
Yes, "features" sounds better. @samueldg |
I'll sort that out now 👍 |
Thanks a lot @samueljsb! |
Fixes #4907