forked from pool/python-unittest-xml-reporting
- Add python-311.patch to support python 3.11
gh#xmlrunner/unittest-xml-reporting#274 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-unittest-xml-reporting?expand=0&rev=30
This commit is contained in:
23
python-311.patch
Normal file
23
python-311.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
Index: unittest-xml-reporting-3.0.2/xmlrunner/result.py
|
||||
===================================================================
|
||||
--- unittest-xml-reporting-3.0.2.orig/xmlrunner/result.py
|
||||
+++ unittest-xml-reporting-3.0.2/xmlrunner/result.py
|
||||
@@ -179,6 +179,9 @@ class _TestInfo(object):
|
||||
"""
|
||||
return self.test_exception_info
|
||||
|
||||
+ def shortDescription(self):
|
||||
+ return self.test_description
|
||||
+
|
||||
|
||||
class _XMLTestResult(_TextTestResult):
|
||||
"""
|
||||
@@ -658,3 +661,8 @@ class _XMLTestResult(_TextTestResult):
|
||||
def _exc_info_to_string(self, err, test):
|
||||
"""Converts a sys.exc_info()-style tuple of values into a string."""
|
||||
return super(_XMLTestResult, self)._exc_info_to_string(err, test)
|
||||
+
|
||||
+ def getDescription(self, test):
|
||||
+ if isinstance(test, tuple):
|
||||
+ test = test[0]
|
||||
+ return super().getDescription(test)
|
Reference in New Issue
Block a user