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

RFC: XML with and without <testsuites> tag #24

Closed
atodorov opened this issue May 28, 2019 · 1 comment
Closed

RFC: XML with and without <testsuites> tag #24

atodorov opened this issue May 28, 2019 · 1 comment

Comments

@atodorov
Copy link

Hello,
in Kiwi TCMS we are seeing failures parsing different XML files. The main difference is that some of them contain <testsuites> tag while others don't, see:
kiwitcms/junit.xml-plugin#9

What would be a good way to discover the varying formats so we can adjust our parsing tools?

@weiwei
Copy link
Owner

weiwei commented Jun 6, 2019

Sorry for not seeing this earlier. This library is just a wrapper over an xml file for easy processing. What I can think of is something similar to the last comment in the thread you posted:

if xml._tag == "testsuites":
  cases = [case for cases in xml for case in cases]
else:
  cases = list(xml)

But I'm open to suggestions.

@weiwei weiwei closed this as completed Mar 6, 2020
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

No branches or pull requests

2 participants