Fix weird code style in combine_results.py
@@ -45,7 +45,7 @@ def main():
parser = get_parser()
args = parser.parse_args()
- rc = 0;
+ rc = 0
result = ET.Element("testsuites", name=args.testsuites_name);
@@ -53,11 +53,13 @@ def main():
if args.debug : print("Reading file %s" % fname)
tree = ET.parse(fname)
for ts in tree.iter("testsuite"):
- if args.debug : print("Ts name : %s, package : %s" % ( ts.get('name'), ts.get('package')))
+ if args.debug:
+ print("Ts name : %s, package : %s" % ( ts.get('name'), ts.get('package')))
use_element = None
for existing in result:
- if ((existing.get('name') == ts.get('name') and (existing.get('package') == ts.get('package')))):
- if args.debug : print("Already found")
+ if existing.get('name') == ts.get('name') and existing.get('package') == ts.get('package'):
+ if args.debug:
+ print("Already found")
use_element = existing
break
if use_element is None:
@@ -66,7 +68,8 @@ def main():
#for tc in ts.getiterator("testcase"):
use_element.extend(list(ts));
- if args.debug : ET.dump(result)
+ if args.debug:
+ ET.dump(result)
testsuite_count = 0
testcase_count = 0
@@ -75,7 +78,8 @@ def main():
for testcase in testsuite.iter('testcase'):
testcase_count += 1
for failure in testcase.iter('failure'):
- if args.set_rc: rc=1
+ if args.set_rc:
+ rc = 1
print("Failure in testsuite: '%s' classname: '%s' testcase: '%s' with parameters '%s'" % (testsuite.get('name'), testcase.get('classname'), testcase.get('name'), testsuite.get('package')))
print("Ran a total of %d TestSuites and %d TestCases" % (testsuite_count, testcase_count))
