- Add fix-test-raising-repr.patch gh#pytest-dev/pytest#10473, this make it

compatible with latest release of python-exceptiongroup

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest?expand=0&rev=105
This commit is contained in:
Daniel Garcia 2022-12-05 08:53:03 +00:00 committed by Git OBS Bridge
parent e92f34a15e
commit 4f2e4b3c5b
3 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,21 @@
Index: pytest-7.2.0/testing/test_assertion.py
===================================================================
--- pytest-7.2.0.orig/testing/test_assertion.py
+++ pytest-7.2.0/testing/test_assertion.py
@@ -1664,15 +1664,7 @@ def test_raise_assertion_error_raising_r
"""
)
result = pytester.runpytest()
- if sys.version_info >= (3, 11):
- # python 3.11 has native support for un-str-able exceptions
- result.stdout.fnmatch_lines(
- ["E AssertionError: <exception str() failed>"]
- )
- else:
- result.stdout.fnmatch_lines(
- ["E AssertionError: <unprintable AssertionError object>"]
- )
+ result.stdout.fnmatch_lines(["E AssertionError: <exception str() failed>"])
def test_issue_1944(pytester: Pytester) -> None:

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Dec 5 08:51:41 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
- Add fix-test-raising-repr.patch gh#pytest-dev/pytest#10473, this make it
compatible with latest release of python-exceptiongroup
-------------------------------------------------------------------
Tue Nov 29 13:09:22 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>

View File

@ -39,6 +39,8 @@ Summary: Simple powerful testing with Python
License: MIT
URL: https://github.com/pytest-dev/pytest
Source: https://files.pythonhosted.org/packages/source/p/pytest/pytest-%{version}.tar.gz
# PATCH-FIX-UPSTREAM fix-test-raising-repr.patch gh#pytest-dev/pytest#10473
Patch: fix-test-raising-repr.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module setuptools_scm >= 6}
BuildRequires: %{python_module setuptools}