Skip to content

Avoid passing a non-Collection iterable to parametrize - #120

Merged
gaborbernat merged 1 commit into
tox-dev:mainfrom
musicinmybrain:parametrize-collection
Aug 13, 2026
Merged

Avoid passing a non-Collection iterable to parametrize#120
gaborbernat merged 1 commit into
tox-dev:mainfrom
musicinmybrain:parametrize-collection

Conversation

@musicinmybrain

Copy link
Copy Markdown
Contributor

This is deprecated since pytest 9.1; see https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators.

Using list concatenation (+) is simpler than wrapping the itertools.chain(…) in list(…).

Avoids:

=============================== warnings summary ===============================
../../../../../usr/lib/python3.15/site-packages/_pytest/python.py:124
  /usr/lib/python3.15/site-packages/_pytest/python.py:124: PytestRemovedIn10Warning: Passing a non-Collection iterable to parametrize is deprecated.
  Test: tests/py_info/test_py_info.py::test_satisfy_py_info, argvalues type: chain
  Please convert to a list or tuple.
  See https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators
    metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

@gaborbernat
gaborbernat enabled auto-merge (squash) August 13, 2026 22:05
@gaborbernat
gaborbernat merged commit b30753a into tox-dev:main Aug 13, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants