14
0
Files
python-unittest-xml-reporting/python-311.patch
Steve Kowalik 189208fddc - Update to 3.2.0:
* fix subtest referencing objects (#220) 
  * Avoid including empty system-out and system-err when reporting
  * explicitly require lxml (#232)
  * make time measurements monotonic (#231)
  * Add outsuffix option (#238)
  * Used unittest.TextTestResult instead of an alias _TextTestResult
    removed in Python 3.11
  * Used assertRegex() instead of an alias assertRegexpMatches() removed
    in Python 3.11
  * Fix typo in tests/django_test.py.
  * Update Django testing.
  * Add LICENSE to tarball
- Switch to pyproject macros.
- Refresh python-311.patch.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-unittest-xml-reporting?expand=0&rev=32
2024-01-30 05:54:30 +00:00

24 lines
866 B
Diff

Index: unittest-xml-reporting-3.2.0/xmlrunner/result.py
===================================================================
--- unittest-xml-reporting-3.2.0.orig/xmlrunner/result.py
+++ unittest-xml-reporting-3.2.0/xmlrunner/result.py
@@ -188,6 +188,9 @@ class _TestInfo(object):
"""
return self.test_exception_info
+ def shortDescription(self):
+ return self.test_description
+
class _XMLTestResult(TextTestResult):
"""
@@ -673,3 +676,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)