MCPcopy
hub / github.com/pytest-dev/pytest / DirectParamFixtureDef

Class DirectParamFixtureDef

src/_pytest/python.py:1158–1178  ·  view source on GitHub ↗

A custom FixtureDef for direct parametrization fixtures. Each parameter in direct parametrization is desugared to a parametrized fixture which returns the direct parameterization value as its param. We use this custom type as a "marker" for this type of FixtureDef, but usually behav

Source from the content-addressed store, hash-verified

1156
1157
1158class DirectParamFixtureDef(FixtureDef[FixtureValue]):
1159 """A custom FixtureDef for direct parametrization fixtures.
1160
1161 Each parameter in direct parametrization is desugared to a parametrized
1162 fixture which returns the direct parameterization value as its param.
1163 We use this custom type as a "marker" for this type of FixtureDef, but
1164 usually behaves like any other FixtureDef.
1165 """
1166
1167 def __init__(self, *, node: nodes.Node, argname: str, scope: Scope) -> None:
1168 super().__init__(
1169 config=node.config,
1170 baseid=NOTSET,
1171 argname=argname,
1172 func=get_direct_param_fixture_func,
1173 scope=scope,
1174 params=None,
1175 ids=None,
1176 node=node,
1177 _ispytest=True,
1178 )
1179
1180
1181# Used for storing fixturedefs for direct parametrization.

Callers 1

parametrizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected