Commit f4945bd
authored
tests: fix compatibility with pytest 9.1.0 (#17465)
This PR fixes a compatibility issue with `pytest==9.1.0`. See
https://docs.pytest.org/en/stable/deprecations.html#non-collection-iterables-in-pytest-mark-parametrize
See the stack trace below which appears without the fix
```
________________________________________________________________________________________________________ ERROR collecting tests/unit/test_python_version_support.py ________________________________________________________________________________________________________
.nox/97a4db2a/lib/python3.14/site-packages/pluggy/_hooks.py:512: in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.nox/97a4db2a/lib/python3.14/site-packages/pluggy/_manager.py:120: in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.nox/97a4db2a/lib/python3.14/site-packages/pluggy/_callers.py:53: in run_old_style_hookwrapper
return result.get_result()
^^^^^^^^^^^^^^^^^^^
.nox/97a4db2a/lib/python3.14/site-packages/pytest_asyncio/plugin.py:701: in pytest_pycollect_makeitem_convert_async_functions_to_subclass
) = hook_result.get_result()
^^^^^^^^^^^^^^^^^^^^^^^^
.nox/97a4db2a/lib/python3.14/site-packages/pluggy/_callers.py:38: in run_old_style_hookwrapper
res = yield
^^^^^
.nox/97a4db2a/lib/python3.14/site-packages/_pytest/python.py:250: in pytest_pycollect_makeitem
return list(collector._genfunctions(name, obj))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.nox/97a4db2a/lib/python3.14/site-packages/_pytest/python.py:476: in _genfunctions
self.ihook.pytest_generate_tests.call_extra(methods, dict(metafunc=metafunc))
.nox/97a4db2a/lib/python3.14/site-packages/pluggy/_hooks.py:573: in call_extra
return self._hookexec(self.name, hookimpls, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.nox/97a4db2a/lib/python3.14/site-packages/pluggy/_manager.py:120: in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.nox/97a4db2a/lib/python3.14/site-packages/_pytest/python.py:124: in pytest_generate_tests
metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)
.nox/97a4db2a/lib/python3.14/site-packages/_pytest/python.py:1316: in parametrize
argnames, parametersets = ParameterSet._for_parametrize(
.nox/97a4db2a/lib/python3.14/site-packages/_pytest/mark/structures.py:203: in _for_parametrize
warnings.warn(
E pytest.PytestRemovedIn10Warning: Passing a non-Collection iterable to parametrize is deprecated.
E Test: tests/unit/test_python_version_support.py::test_all_tracked_versions_and_date_scenarios, argvalues type: generator
E Please convert to a list or tuple.
E See https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators
```1 parent 56cbea8 commit f4945bd
1 file changed
Lines changed: 20 additions & 15 deletions
Lines changed: 20 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | | - | |
21 | 19 | | |
22 | 20 | | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | | - | |
28 | | - | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
122 | 126 | | |
| 127 | + | |
123 | 128 | | |
124 | 129 | | |
125 | 130 | | |
126 | 131 | | |
127 | | - | |
| 132 | + | |
128 | 133 | | |
129 | 134 | | |
130 | 135 | | |
| |||
0 commit comments