'Create an XML tag with information about this test case.'

def xml(self):

    testcase = ET.Element('testcase')
    testcase.set('classname', self._class)
    testcase.set('name', self._method)
    testcase.set('time', ('%.4f' % self._time))
    if (self._failure != None):
        self._print_error(testcase, 'failure', self._failure)
    if (self._error != None):
        self._print_error(testcase, 'error', self._error)
    return testcase
