(
argnames: str | Sequence[str],
argvalues: Iterable[ParameterSet | Sequence[object] | object],
*args,
**kwargs,
)
| 164 | |
| 165 | @staticmethod |
| 166 | def _parse_parametrize_args( |
| 167 | argnames: str | Sequence[str], |
| 168 | argvalues: Iterable[ParameterSet | Sequence[object] | object], |
| 169 | *args, |
| 170 | **kwargs, |
| 171 | ) -> tuple[Sequence[str], bool]: |
| 172 | if isinstance(argnames, str): |
| 173 | # A trailing comma indicates tuple-style: "arg," is equivalent to ("arg",) |
| 174 | # In this case, argvalues should be a list of tuples, not wrapped values. |
| 175 | # See https://github.com/pytest-dev/pytest/issues/719 |
| 176 | has_trailing_comma = argnames.rstrip().endswith(",") |
| 177 | argnames = [x.strip() for x in argnames.split(",") if x.strip()] |
| 178 | force_tuple = len(argnames) == 1 and not has_trailing_comma |
| 179 | else: |
| 180 | force_tuple = False |
| 181 | return argnames, force_tuple |
| 182 | |
| 183 | @staticmethod |
| 184 | def _parse_parametrize_parameters( |
no test coverage detected