From 89b757d3a44be27cec6f1e78a2b85bb0779304c4 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 13 Aug 2026 22:32:44 +0100 Subject: [PATCH] Avoid passing a non-Collection iterable to parametrize This is deprecated since pytest 9.1; see https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators. --- tests/py_info/test_py_info.py | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/tests/py_info/test_py_info.py b/tests/py_info/test_py_info.py index ffbd8fe..b45240d 100644 --- a/tests/py_info/test_py_info.py +++ b/tests/py_info/test_py_info.py @@ -75,25 +75,19 @@ def test_bad_exe_py_info_no_raise( @pytest.mark.parametrize( "spec", - itertools.chain( - [sys.executable], - [ - f"{impl}{'.'.join(str(i) for i in ver)}{'t' if CURRENT.free_threaded else ''}{arch}" - for impl, ver, arch in itertools.product( - ( - [CURRENT.implementation] - + (["python"] if CURRENT.implementation == "CPython" else []) - + ( - [CURRENT.implementation.lower()] - if CURRENT.implementation != CURRENT.implementation.lower() - else [] - ) - ), - [sys.version_info[0 : i + 1] for i in range(3)], - ["", f"-{CURRENT.architecture}"], - ) - ], - ), + [sys.executable] + + [ + f"{impl}{'.'.join(str(i) for i in ver)}{'t' if CURRENT.free_threaded else ''}{arch}" + for impl, ver, arch in itertools.product( + ( + [CURRENT.implementation] + + (["python"] if CURRENT.implementation == "CPython" else []) + + ([CURRENT.implementation.lower()] if CURRENT.implementation != CURRENT.implementation.lower() else []) + ), + [sys.version_info[0 : i + 1] for i in range(3)], + ["", f"-{CURRENT.architecture}"], + ) + ], ) def test_satisfy_py_info(spec: str) -> None: parsed_spec = PythonSpec.from_string_spec(spec)