Return all direct parametrization arguments of a node, so we don't mistake them for fixtures. Check https://github.com/pytest-dev/pytest/issues/5036. These things are done later as well when dealing with parametrization so this could be improved.
(self, node: nodes.Node)
| 1431 | session.config.pluginmanager.register(self, "funcmanage") |
| 1432 | |
| 1433 | def _get_direct_parametrize_args(self, node: nodes.Node) -> List[str]: |
| 1434 | """Return all direct parametrization arguments of a node, so we don't |
| 1435 | mistake them for fixtures. |
| 1436 | |
| 1437 | Check https://github.com/pytest-dev/pytest/issues/5036. |
| 1438 | |
| 1439 | These things are done later as well when dealing with parametrization |
| 1440 | so this could be improved. |
| 1441 | """ |
| 1442 | parametrize_argnames: List[str] = [] |
| 1443 | for marker in node.iter_markers(name="parametrize"): |
| 1444 | if not marker.kwargs.get("indirect", False): |
| 1445 | p_argnames, _ = ParameterSet._parse_parametrize_args( |
| 1446 | *marker.args, **marker.kwargs |
| 1447 | ) |
| 1448 | parametrize_argnames.extend(p_argnames) |
| 1449 | |
| 1450 | return parametrize_argnames |
| 1451 | |
| 1452 | def getfixtureinfo( |
| 1453 | self, node: nodes.Node, func, cls, funcargs: bool = True |
no test coverage detected