public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pytest-subprocess] rawhide: Fix tests with Python 3.15.2+
@ 2026-11-25 16:26 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-11-25 16:26 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-pytest-subprocess
Branch : rawhide
Commit : 330a1d5e9f1dad63b0a27ba40f86956034b298a2
Author : Miro Hrončok <miro@hroncok.cz>
Date   : 2026-11-25T15:02:17+01:00
Stats  : +25/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/python-pytest-subprocess/c/330a1d5e9f1dad63b0a27ba40f86956034b298a2?branch=rawhide

Log:
Fix tests with Python 3.15.2+

---
diff --git a/2207cd7c-test_check_call.patch b/2207cd7c-test_check_call.patch
new file mode 100644
index 0000000..447bcda
--- /dev/null
+++ b/2207cd7c-test_check_call.patch
@@ -0,0 +1,21 @@
+diff --git a/tests/test_subprocess.py b/tests/test_subprocess.py
+index 480ea25..1591926 100644
+--- a/tests/test_subprocess.py
++++ b/tests/test_subprocess.py
+@@ -311,11 +311,11 @@ def test_check_call(fp, fake):
+         assert subprocess.check_call((PYTHON, "example_script.py", "non-zero")) == 1
+ 
+     if sys.version_info >= (3, 6):
+-        assert (
+-            str(exc.value).replace("\\\\", "\\")
+-            == f"Command '('{PYTHON}', 'example_script.py', 'non-zero')' "
+-            "returned non-zero exit status 1."
+-        )
++        command = (PYTHON, "example_script.py", "non-zero")
++        assert type(exc.value) is subprocess.CalledProcessError
++        assert exc.value.returncode == 1
++        assert exc.value.cmd == command
++        assert str(exc.value) == str(subprocess.CalledProcessError(1, command))
+ 
+ 
+ @pytest.mark.parametrize("fake", [False, True])

diff --git a/python-pytest-subprocess.spec b/python-pytest-subprocess.spec
index 837b32c..4c5af88 100644
--- a/python-pytest-subprocess.spec
+++ b/python-pytest-subprocess.spec
@@ -7,6 +7,10 @@ License:        MIT
 URL:            https://github.com/aklajnert/pytest-subprocess
 Source0:        %{url}/archive/%{version}/pytest-subprocess-%{version}.tar.gz
 
+# Fix tests with Python 3.15.2+
+# Test-only changes taken from https://github.com/aklajnert/pytest-subprocess/commit/2207cd7c
+Patch:          2207cd7c-test_check_call.patch
+
 BuildArch:      noarch
 BuildRequires:  python3-devel
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-25 16:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 16:26 [rpms/python-pytest-subprocess] rawhide: Fix tests with Python 3.15.2+ 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox