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)
|
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 20 08:50:03 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Add python-311.patch to support python 3.11
|
||||||
|
gh#xmlrunner/unittest-xml-reporting#274
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 19 12:10:51 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
Wed Oct 19 12:10:51 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-unittest-xml-reporting
|
# spec file for package python-unittest-xml-reporting
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2023 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
Name: python-unittest-xml-reporting
|
Name: python-unittest-xml-reporting
|
||||||
Version: 3.0.2
|
Version: 3.0.2
|
||||||
@@ -25,6 +24,8 @@ Summary: PyUnit-based test runner with JUnit like XML reporting
|
|||||||
License: LGPL-3.0-or-later
|
License: LGPL-3.0-or-later
|
||||||
URL: https://github.com/xmlrunner/unittest-xml-reporting
|
URL: https://github.com/xmlrunner/unittest-xml-reporting
|
||||||
Source: https://github.com/xmlrunner/unittest-xml-reporting/archive/%{version}.tar.gz
|
Source: https://github.com/xmlrunner/unittest-xml-reporting/archive/%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM python-311.patch gh#xmlrunner/unittest-xml-reporting#274
|
||||||
|
Patch0: python-311.patch
|
||||||
BuildRequires: %{python_module lxml}
|
BuildRequires: %{python_module lxml}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
@@ -40,7 +41,7 @@ to XML files that can be consumed by a wide range of tools, such as build
|
|||||||
systems, IDEs and continuous integration servers.
|
systems, IDEs and continuous integration servers.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n unittest-xml-reporting-%{version}
|
%autosetup -p1 -n unittest-xml-reporting-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
Reference in New Issue
Block a user