fixed duplication of nested test suites

This commit is contained in:
Dirk Thomas 2012-01-30 18:05:49 +00:00
parent 71d01d17e4
commit 5e46e3800e
1 changed files with 5 additions and 1 deletions

View File

@ -324,7 +324,11 @@ def read(test_file, test_name):
return Result(test_name, 0, 0, 0)
results = Result(test_name, 0, 0, 0)
for test_suite in test_suites:
for index, test_suite in enumerate(test_suites):
# skip test suites which are already covered by a parent test suite
if index > 0 and test_suite.parentNode in test_suites[0:index]:
continue
#test_suite = test_suite[0]
vals = [test_suite.getAttribute(attr) for attr in ['errors', 'failures', 'tests']]
vals = [v or 0 for v in vals]