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

optimize testsuite parsing conditions #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions xunitparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ def parse_testsuite(self, root, ts):
for el in root:
if el.tag == 'testcase':
self.parse_testcase(el, ts)
if el.tag == 'properties':
elif el.tag == 'properties':
self.parse_properties(el, ts)
if el.tag == 'system-out' and el.text:
elif el.tag == 'system-out' and el.text:
ts.stdout = el.text.strip()
if el.tag == 'system-err' and el.text:
elif el.tag == 'system-err' and el.text:
ts.stderr = el.text.strip()

def parse_testcase(self, el, ts):
Expand All @@ -200,7 +200,7 @@ def parse_testcase(self, el, ts):
tc.time = to_timedelta(el.attrib.get('time'))
if e.tag == 'system-out' and e.text:
tc.stdout = e.text.strip()
if e.tag == 'system-err' and e.text:
elif e.tag == 'system-err' and e.text:
tc.stderr = e.text.strip()

# add either the original "success" tc or a tc created by elements
Expand Down