@@ -199,6 +199,22 @@ def timedelta_to_human_text(delta: datetime.timedelta) -> str:
199
199
# /////////////////////////////////////////////////////////////////////////////
200
200
201
201
202
+ def helper__build_test_id (item : pytest .Function ) -> str :
203
+ assert item is not None
204
+ assert isinstance (item , pytest .Function )
205
+
206
+ testID = ""
207
+
208
+ if item .cls is not None :
209
+ testID = item .cls .__module__ + "." + item .cls .__name__ + "::"
210
+
211
+ testID = testID + item .name
212
+
213
+ return testID
214
+
215
+ # /////////////////////////////////////////////////////////////////////////////
216
+
217
+
202
218
def helper__makereport__setup (
203
219
item : pytest .Function , call : pytest .CallInfo , outcome : pluggy .Result
204
220
):
@@ -224,12 +240,7 @@ def helper__makereport__setup(
224
240
TEST_PROCESS_STATS .incrementNotExecutedTestCount ()
225
241
return
226
242
227
- testID = ""
228
-
229
- if item .cls is not None :
230
- testID = item .cls .__module__ + "." + item .cls .__name__ + "::"
231
-
232
- testID = testID + item .name
243
+ testID = helper__build_test_id (item )
233
244
234
245
if rep .outcome == "passed" :
235
246
testNumber = TEST_PROCESS_STATS .incrementExecutedTestCount ()
@@ -279,12 +290,7 @@ def helper__makereport__call(
279
290
assert type (rep ) == pytest .TestReport # noqa: E721
280
291
281
292
# --------
282
- testID = ""
283
-
284
- if item .cls is not None :
285
- testID = item .cls .__module__ + "." + item .cls .__name__ + "::"
286
-
287
- testID = testID + item .name
293
+ testID = helper__build_test_id (item )
288
294
289
295
# --------
290
296
assert call .start <= call .stop
0 commit comments