From 984fb29dba9b45151c16f6cbd14d0a18bd676f81 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sun, 28 Jun 2026 20:46:21 +0100 Subject: [PATCH] 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. --- tests/test_dates.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_dates.py b/tests/test_dates.py index 320d470..42e2847 100644 --- a/tests/test_dates.py +++ b/tests/test_dates.py @@ -201,7 +201,7 @@ def test_utc_offset_no_pytz(): # from domdf_python_tools.dates import get_utc_offset -@pytest.mark.parametrize("month_idx, month", enumerate(dates.month_full_names)) +@pytest.mark.parametrize("month_idx, month", list(enumerate(dates.month_full_names))) def test_parse_month(month_idx: int, month: str): month_idx += 1 # to make 1-indexed @@ -219,7 +219,7 @@ def test_parse_month_errors(): dates.parse_month(value) # type: ignore[arg-type] -@pytest.mark.parametrize("month_idx, month", enumerate(dates.month_full_names)) +@pytest.mark.parametrize("month_idx, month", list(enumerate(dates.month_full_names))) def test_get_month_number_from_name(month_idx: int, month: str): month_idx += 1 # to make 1-indexed