Skip to content

Commit 984fb29

Browse files
committed
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#class-scoped-fixture-as-instance-method.
1 parent 759ccd4 commit 984fb29

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_dates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def test_utc_offset_no_pytz():
201201
# from domdf_python_tools.dates import get_utc_offset
202202

203203

204-
@pytest.mark.parametrize("month_idx, month", enumerate(dates.month_full_names))
204+
@pytest.mark.parametrize("month_idx, month", list(enumerate(dates.month_full_names)))
205205
def test_parse_month(month_idx: int, month: str):
206206
month_idx += 1 # to make 1-indexed
207207

@@ -219,7 +219,7 @@ def test_parse_month_errors():
219219
dates.parse_month(value) # type: ignore[arg-type]
220220

221221

222-
@pytest.mark.parametrize("month_idx, month", enumerate(dates.month_full_names))
222+
@pytest.mark.parametrize("month_idx, month", list(enumerate(dates.month_full_names)))
223223
def test_get_month_number_from_name(month_idx: int, month: str):
224224
month_idx += 1 # to make 1-indexed
225225

0 commit comments

Comments
 (0)