public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-watchfiles] rawhide: Fix test compatibility with pytest >= 9.1
@ 2026-06-25  8:53 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-06-25  8:53 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/python-watchfiles
            Branch : rawhide
            Commit : 82a343396b262c2d97b56178b63ed64b0cd3df03
            Author : Tomáš Hrnčiar <thrnciar@redhat.com>
            Date   : 2026-06-24T16:00:28+02:00
            Stats  : +29/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-watchfiles/c/82a343396b262c2d97b56178b63ed64b0cd3df03?branch=rawhide

            Log:
            Fix test compatibility with pytest >= 9.1

Backport upstream PR #384.

Assisted-by: Claude Opus 4.6

---
diff --git a/384.patch b/384.patch
new file mode 100644
index 0000000..b175889
--- /dev/null
+++ b/384.patch
@@ -0,0 +1,26 @@
+From f2643aae706884650de14096eddd53365e23ad0e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <tomas.hrnciar@me.com>
+Date: Wed, 24 Jun 2026 15:57:56 +0200
+Subject: [PATCH] Fix test compatibility with pytest >= 9.1
+
+pytest 9.1 no longer accepts non-Collection iterables in parametrize.
+Wrap the generator function call with list() in test_docs.py.
+
+Assisted-by: Claude Opus 4.6
+---
+ tests/test_docs.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test_docs.py b/tests/test_docs.py
+index 1c0b1419..10314b03 100644
+--- a/tests/test_docs.py
++++ b/tests/test_docs.py
+@@ -79,7 +79,7 @@ def generate_code_chunks(*directories: str):
+ # with pypy we sometimes (???) get a "The loop argument is deprecated since Python 3.8" warning, see
+ # https://github.com/samuelcolvin/watchfiles/runs/7764187741
+ @pytest.mark.filterwarnings('ignore:The loop argument is deprecated:DeprecationWarning')
+-@pytest.mark.parametrize('module_name,source_code', generate_code_chunks('watchfiles', 'docs'))
++@pytest.mark.parametrize('module_name,source_code', list(generate_code_chunks('watchfiles', 'docs')))
+ def test_docs_examples(module_name, source_code, import_execute, mocker, mock_rust_notify: 'MockRustType'):
+     mock_rust_notify([{(1, 'foo.txt'), (2, 'bar.py')}])
+     mocker.patch('watchfiles.run.spawn_context.Process')

diff --git a/python-watchfiles.spec b/python-watchfiles.spec
index 3d8b280..f20ffca 100644
--- a/python-watchfiles.spec
+++ b/python-watchfiles.spec
@@ -12,6 +12,9 @@ Source:         %{pypi_source watchfiles}
 # Downstream-only: allow a slightly older pytest to support EPEL10
 Patch:          0001-Downstream-only-allow-a-slightly-older-pytest-to-sup.patch
 
+# Fix test compatibility with pytest >= 9.1 (non-Collection parametrize)
+Patch:          https://github.com/samuelcolvin/watchfiles/pull/384.patch
+
 BuildRequires:  python3-devel
 BuildRequires:  cargo-rpm-macros >= 24
 BuildRequires:  tomcli

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

only message in thread, other threads:[~2026-06-25  8:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-25  8:53 [rpms/python-watchfiles] rawhide: Fix test compatibility with pytest >= 9.1 

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