From: Colin Watson Date: Wed, 1 Jul 2026 10:16:42 +0100 Subject: Don't parameterize tests using non-Collection iterables This is deprecated as of pytest 9.1; see https://docs.pytest.org/en/stable/deprecations.html#non-collection-iterables-in-pytest-mark-parametrize. Bug-Debian: https://bugs.debian.org/1140873 Forwarded: https://github.com/pallets/click/pull/3656 Last-Update: 2026-07-01 --- tests/test_basic.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/test_basic.py b/tests/test_basic.py index 3f73528..3889ea1 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -2,7 +2,6 @@ from __future__ import annotations import enum import os -from itertools import chain import pytest @@ -258,10 +257,10 @@ def test_boolean_flag(runner, default, args, expect): @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")), - ), + [ + *((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()