Skip to content

Commit 6ec99f8

Browse files
authored
Don't parameterize tests using non-Collection iterables (#3656)
2 parents 240603f + 30749b4 commit 6ec99f8

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Unreleased
66
Colorama is no longer a dependency and is not used. {issue}`2986` {pr}`3505`
77
- {class}`Argument` accepts a `help` parameter, and help output includes
88
a `Positional arguments` section when argument help is available. {issue}`2983` {pr}`3473`
9+
- Fix test failures when using pytest >= 9.1. {pr}`3656`
910

1011
## Version 8.4.2
1112

tests/test_basic.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import enum
44
import os
5-
from itertools import chain
65

76
import pytest
87

@@ -258,10 +257,10 @@ def cli(f):
258257

259258
@pytest.mark.parametrize(
260259
("value", "expect"),
261-
chain(
262-
((x, "True") for x in ("1", "true", "t", "yes", "y", "on")),
263-
((x, "False") for x in ("0", "false", "f", "no", "n", "off")),
264-
),
260+
[
261+
*((x, "True") for x in ("1", "true", "t", "yes", "y", "on")),
262+
*((x, "False") for x in ("0", "false", "f", "no", "n", "off")),
263+
],
265264
)
266265
def test_boolean_conversion(runner, value, expect):
267266
@click.command()

0 commit comments

Comments
 (0)