<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -11,7 +11,7 @@ The script below, adapted from the unittest documentation, shows how to use
 XMLTestRunner in a very simple way. In fact, the only difference between this
 script and the original one is the last line:
 
-import random
+import random.
 import unittest
 import xmlrunner
 
@@ -202,13 +202,20 @@ class _XMLTestResult(_TextTestResult):
     
     _report_testsuite = staticmethod(_report_testsuite)
     
+    def _test_method_name(test_method):
+        &quot;Returns the test method name.&quot;
+        test_id = test_method.id()
+        return test_id.split('.')[-1]
+    
+    _test_method_name = staticmethod(_test_method_name)
+    
     def _report_testcase(suite_name, test_result, xml_testsuite, xml_document):
         &quot;Appends a testcase section to the XML document.&quot;
         testcase = xml_document.createElement('testcase')
         xml_testsuite.appendChild(testcase)
         
         testcase.setAttribute('classname', suite_name)
-        testcase.setAttribute('name', test_result.test_method._testMethodName)
+        testcase.setAttribute('name', _XMLTestResult._test_method_name(test_result.test_method))
         testcase.setAttribute('time', '%.3f' % test_result.get_elapsed_time())
         
         if (test_result.outcome != _TestInfo.SUCCESS):
@@ -217,7 +224,7 @@ class _XMLTestResult(_TextTestResult):
             testcase.appendChild(failure)
             
             failure.setAttribute('type', test_result.err[0].__name__)
-            failure.setAttribute('message', test_result.err[1].message)
+            failure.setAttribute('message', str(test_result.err[1]))
             
             error_info = test_result.get_error_info()
             failureText = xml_document.createCDATASection(error_info)
@@ -350,6 +357,7 @@ class XMLTestRunner(TextTestRunner):
             self.stream.writeln('Generating XML reports...')
             result.generate_reports(self)
         finally:
+            pass
             self._restore_standard_output()
         
         return result</diff>
      <filename>src/xmlrunner/__init__.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>75b8e1fe6954e9604986b2fc25374c514b306d87</id>
    </parent>
  </parents>
  <author>
    <name>Daniel Fernandes Martins</name>
    <email>daniel.tritone@gmail.com</email>
  </author>
  <url>http://github.com/danielfm/unittest-xml-reporting/commit/6297c43694271b2ce2095060da480e17add3eb6c</url>
  <id>6297c43694271b2ce2095060da480e17add3eb6c</id>
  <committed-date>2009-04-19T12:28:03-07:00</committed-date>
  <authored-date>2009-04-19T12:28:03-07:00</authored-date>
  <message>Fixing compatibility errors with Python 2.4/2.6.</message>
  <tree>4fc5a57bb06c10f76d766786e527fc8e6b3b013a</tree>
  <committer>
    <name>Daniel Fernandes Martins</name>
    <email>daniel.tritone@gmail.com</email>
  </committer>
</commit>
