Skip to content
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

Add JUnitXML.fromroot #92

Merged
merged 1 commit into from
Jun 25, 2022
Merged

Conversation

EnricoMi
Copy link
Collaborator

This allows to create an JUnitXML instance from an ElementTree root element, just like parsing a file.

Use case: I have parsed a file into an ElementTree and performed some operations on that tree. From the final tree, I want to create the JUnitXML object, identical to JUnitXML.fromfile and JUnitXML.fromstring.

There is some extra logic in JUnitXML.fromfile and JUnitXML.fromstring, that is not in Element.fromelem.

@codecov
Copy link

codecov bot commented Jun 21, 2022

Codecov Report

Merging #92 (2754098) into master (7faf99f) will decrease coverage by 0.93%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #92      +/-   ##
==========================================
- Coverage   99.45%   98.52%   -0.94%     
==========================================
  Files           4        6       +2     
  Lines        1102     1218     +116     
==========================================
+ Hits         1096     1200     +104     
- Misses          6       18      +12     
Impacted Files Coverage Δ
junitparser/junitparser.py 99.14% <100.00%> (+0.02%) ⬆️
tests/test_general.py 100.00% <100.00%> (ø)
junitparser/cli.py 53.84% <0.00%> (ø)
tests/test_cli.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7faf99f...2754098. Read the comment docs.

Copy link
Owner

@weiwei weiwei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@weiwei weiwei merged commit 32469be into weiwei:master Jun 25, 2022
@EnricoMi
Copy link
Collaborator Author

Thanks!

@EnricoMi EnricoMi deleted the branch-junitxml-fromroot branch June 27, 2022 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants