@@ -132,20 +132,6 @@ def __init__(self,
132132 id = None , # type: str # noqa
133133 marks = () # type: Union[Any, Sequence[Any]]
134134 ):
135- """
136- Creates a reference to a value getter, to be used in `parametrize_plus`.
137-
138- A `lazy_value` is the same thing than a function-scoped fixture, except that the value getter function is not a
139- fixture and therefore can neither be parametrized nor depend on fixtures. It should have no mandatory argument.
140-
141- Note that a `lazy_value` can be included in a `pytest.param` without problem. In that case the id defined by
142- `pytest.param` will take precedence over the one defined in `lazy_value` if any. The marks, however,
143- will all be kept wherever they are defined.
144-
145- :param valuegetter: a callable without mandatory arguments
146- :param id: an optional id. Otherwise `valuegetter.__name__` will be used by default
147- :param marks: optional marks. `valuegetter` marks will also be preserved.
148- """
149135 self .valuegetter = valuegetter
150136 self ._id = id
151137 if isinstance (marks , (tuple , list , set )):
@@ -289,6 +275,20 @@ def lazy_value(valuegetter, # type: Callable[[], Any]
289275 id = None , # type: str # noqa
290276 marks = () # type: Union[Any, Sequence[Any]]
291277 ):
278+ """
279+ Creates a reference to a value getter, to be used in `parametrize_plus`.
280+
281+ A `lazy_value` is the same thing than a function-scoped fixture, except that the value getter function is not a
282+ fixture and therefore can neither be parametrized nor depend on fixtures. It should have no mandatory argument.
283+
284+ Note that a `lazy_value` can be included in a `pytest.param` without problem. In that case the id defined by
285+ `pytest.param` will take precedence over the one defined in `lazy_value` if any. The marks, however,
286+ will all be kept wherever they are defined.
287+
288+ :param valuegetter: a callable without mandatory arguments
289+ :param id: an optional id. Otherwise `valuegetter.__name__` will be used by default
290+ :param marks: optional marks. `valuegetter` marks will also be preserved.
291+ """
292292 return LazyValue (valuegetter , id = id , marks = marks )
293293
294294
0 commit comments