| From 1cdbe9829973a30037075d613b5a1d5a42e260d5 Mon Sep 17 00:00:00 2001 |
| From: Richard Purdie <richard.purdie@linuxfoundation.org> |
| Date: Mon, 15 Jun 2026 11:37:28 +0100 |
| Subject: [PATCH] Fix an error with newer versions of pytest (9.1.0) by |
| converting the generator into a tuple: |
| |
| 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 |
| |
| Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> |
| |
| Upstream-Status: Submitted [https://github.com/pallets/click/pull/3597] |
| --- |
| tests/test_basic.py | 4 ++-- |
| 1 file changed, 2 insertions(+), 2 deletions(-) |
| |
| diff --git a/tests/test_basic.py b/tests/test_basic.py |
| index 34d22e7..8076dd8 100644 |
| --- a/tests/test_basic.py |
| +++ b/tests/test_basic.py |
| @@ -258,10 +258,10 @@ def test_boolean_flag(runner, default, args, expect): |
| |
| @pytest.mark.parametrize( |
| ("value", "expect"), |
| - chain( |
| + 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): |
| @click.command() |