File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -172,15 +172,10 @@ def step_func(request):
172
172
173
173
step_func .__name__ = force_encode (parsed_step_name )
174
174
175
- @pytest .fixture (scope = scope )
176
175
def lazy_step_func ():
177
176
return step_func
178
177
179
178
step_func .step_type = step_type
180
-
181
- lazy_step_func = contribute_to_module (
182
- get_caller_module (), get_step_fixture_name (parsed_step_name , step_type ), lazy_step_func )
183
-
184
179
lazy_step_func .step_type = step_type
185
180
186
181
# Preserve the docstring
@@ -190,6 +185,13 @@ def lazy_step_func():
190
185
if converters :
191
186
step_func .converters = lazy_step_func .converters = converters
192
187
188
+ lazy_step_func = pytest .fixture (scope = scope )(lazy_step_func )
189
+ contribute_to_module (
190
+ module = get_caller_module (),
191
+ name = get_step_fixture_name (parsed_step_name , step_type ),
192
+ func = lazy_step_func ,
193
+ )
194
+
193
195
return func
194
196
195
197
return decorator
You can’t perform that action at this time.
0 commit comments