File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -316,14 +316,14 @@ def helper__makereport__call(
316
316
317
317
exitStatus = "SKIPPED"
318
318
reasonText = str (call .excinfo .value )
319
- reasonMsg = "SKIP REASON: {0}"
319
+ reasonMsgTempl = "SKIP REASON: {0}"
320
320
321
321
elif type (call .excinfo .value ) == _pytest .outcomes .XFailed : # noqa: E721
322
322
TEST_PROCESS_STATS .incrementXFailedTestCount (testID )
323
323
324
324
exitStatus = "XFAILED"
325
325
reasonText = str (call .excinfo .value )
326
- reasonMsg = "XFAIL REASON: {0}"
326
+ reasonMsgTempl = "XFAIL REASON: {0}"
327
327
else :
328
328
exitStatus = "XFAILED"
329
329
assert hasattr (rep , "wasxfail" )
@@ -333,13 +333,16 @@ def helper__makereport__call(
333
333
TEST_PROCESS_STATS .incrementXFailedTestCount (testID )
334
334
335
335
reasonText = rep .wasxfail
336
- reasonMsg = "XFAIL REASON: {0}"
336
+ reasonMsgTempl = "XFAIL REASON: {0}"
337
337
338
338
logging .error (call .excinfo .value )
339
339
340
+ assert type (reasonText ) == str # noqa: E721
341
+
340
342
if reasonText != "" :
343
+ assert type (reasonMsgTempl ) == str # noqa: E721
341
344
logging .info ("*" )
342
- logging .info ("* " + reasonMsg .format (reasonText ))
345
+ logging .info ("* " + reasonMsgTempl .format (reasonText ))
343
346
344
347
elif rep .outcome == "failed" :
345
348
assert call .excinfo is not None
You can’t perform that action at this time.
0 commit comments