def _report_testsuite(suite_name, outsuffix, tests, xml_document):
        testsuite = xml_document.createElement('testsuite')
        xml_document.appendChild(testsuite)

        testsuite.setAttribute('name', "%s-%s" % (suite_name, outsuffix))
        testsuite.setAttribute('tests', str(len(tests)))

        testsuite.setAttribute('time', '%.3f' % \
            sum(map(lambda e: e.elapsed_time, tests)))

        failures = filter(lambda e: e.outcome==_TestInfo.FAILURE, tests)
        testsuite.setAttribute('failures', str(len(list(failures))))

        errors = filter(lambda e: e.outcome==_TestInfo.ERROR, tests)
        testsuite.setAttribute('errors', str(len(list(errors))))

        return testsuite
Appends the testsuite section to the XML document.
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/site-packages/unittest_xml_reporting-1.4.3-py2.5.egg/xmlrunner/__init__.py/_XMLTestResult._report_testsuite