def _report_testcase(suite_name, test_result, xml_testsuite, xml_document):
        testcase = xml_document.createElement('testcase')
        xml_testsuite.appendChild(testcase)

        testcase.setAttribute('classname', suite_name)
        testcase.setAttribute('name', \
            _XMLTestResult._test_method_name(test_result.test_method))
        testcase.setAttribute('time', '%.3f' % test_result.elapsed_time)

        if (test_result.outcome != _TestInfo.SUCCESS):
            elem_name = ('failure', 'error')[test_result.outcome-1]
            failure = xml_document.createElement(elem_name)
            testcase.appendChild(failure)

            failure.setAttribute('type', test_result.err[0].__name__)
            failure.setAttribute('message', str(test_result.err[1]))

            error_info = str(test_result.get_error_info())
            failureText = xml_document.createCDATASection(error_info)
            failure.appendChild(failureText)
Set up monitor without passing a custom reactor.
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/site-packages/unittest_xml_reporting-1.4.3-py2.5.egg/xmlrunner/__init__.py/_XMLTestResult._report_testcase--crossover with--dataset/ETHPy150Open dustin/twitty-twister/twittytwister/test/test_twitter.py/TwitterMonitorTest.test_init