Skip to content

Commit dbc68a4

Browse files
committed
Address pytest deprecation warning
1 parent ab2c4a6 commit dbc68a4

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

test/test_end2end.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from __future__ import annotations
2-
from collections.abc import Iterator
32
import logging
43
import os
54
from pathlib import Path
@@ -83,7 +82,8 @@ def mkcases(
8382
subdir: str,
8483
marks: list[pytest.MarkDecorator],
8584
details_cls: Type[BaseModel] = CaseDetails,
86-
) -> Iterator[ParameterSet]:
85+
) -> list[ParameterSet]:
86+
cases = []
8787
for repozip in sorted((DATA_DIR / "repos" / subdir).glob("*.zip")):
8888
details = details_cls.model_validate_json(
8989
repozip.with_suffix(".json").read_text(encoding="utf-8")
@@ -94,12 +94,15 @@ def mkcases(
9494
)
9595
except FileNotFoundError:
9696
marknames = []
97-
yield pytest.param(
98-
repozip,
99-
details,
100-
marks=marks + [getattr(pytest.mark, m) for m in marknames],
101-
id=f"{subdir}/{repozip.stem}",
97+
cases.append(
98+
pytest.param(
99+
repozip,
100+
details,
101+
marks=marks + [getattr(pytest.mark, m) for m in marknames],
102+
id=f"{subdir}/{repozip.stem}",
103+
)
102104
)
105+
return cases
103106

104107

105108
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)