From 4f2e4b3c5b8aacc94d493ff49b3ae3240db57b89425368b6c8de820cb9b37f00 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Mon, 5 Dec 2022 08:53:03 +0000 Subject: [PATCH] - 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 --- fix-test-raising-repr.patch | 21 +++++++++++++++++++++ python-pytest.changes | 6 ++++++ python-pytest.spec | 2 ++ 3 files changed, 29 insertions(+) create mode 100644 fix-test-raising-repr.patch diff --git a/fix-test-raising-repr.patch b/fix-test-raising-repr.patch new file mode 100644 index 0000000..b3b513a --- /dev/null +++ b/fix-test-raising-repr.patch @@ -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: "] +- ) +- else: +- result.stdout.fnmatch_lines( +- ["E AssertionError: "] +- ) ++ result.stdout.fnmatch_lines(["E AssertionError: "]) + + + def test_issue_1944(pytester: Pytester) -> None: diff --git a/python-pytest.changes b/python-pytest.changes index 1b9e2c2..1cffebc 100644 --- a/python-pytest.changes +++ b/python-pytest.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Dec 5 08:51:41 UTC 2022 - Daniel Garcia + +- 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 diff --git a/python-pytest.spec b/python-pytest.spec index e40fd0a..ac3d2fe 100644 --- a/python-pytest.spec +++ b/python-pytest.spec @@ -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}