File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from __future__ import annotations
2- from collections .abc import Iterator
32import logging
43import os
54from 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 (
You can’t perform that action at this time.
0 commit comments