From 0d340091df4acc6e21333ab6ffa20508540cadf6 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 15 Jun 2026 11:44:25 +0100 Subject: [PATCH] tests/test_basic: Fix to work with newer versions of pytest Fix an error with newer versions of pytest (9.1.0) by converting the generator into a tuple to resolve: E pytest.PytestRemovedIn10Warning: Passing a non-Collection iterable to parametrize is deprecated. E Test: tests/test_basic.py::test_boolean_conversion, argvalues type: chain E Please convert to a list or tuple. E See https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators ERROR: tests/test_basic.py:tests/test_basic.py --- tests/test_basic.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_basic.py b/tests/test_basic.py index 3f7352879f..ebbe162e68 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -258,9 +258,11 @@ def cli(f): @pytest.mark.parametrize( ("value", "expect"), - chain( - ((x, "True") for x in ("1", "true", "t", "yes", "y", "on")), - ((x, "False") for x in ("0", "false", "f", "no", "n", "off")), + tuple( + chain( + ((x, "True") for x in ("1", "true", "t", "yes", "y", "on")), + ((x, "False") for x in ("0", "false", "f", "no", "n", "off")), + ) ), ) def test_boolean_conversion(runner, value, expect):