Skip to content

Commit 4502b86

Browse files
helper__makereport__call is updated [revision]
1 parent d9db881 commit 4502b86

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/conftest.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,14 +316,14 @@ def helper__makereport__call(
316316

317317
exitStatus = "SKIPPED"
318318
reasonText = str(call.excinfo.value)
319-
reasonMsg = "SKIP REASON: {0}"
319+
reasonMsgTempl = "SKIP REASON: {0}"
320320

321321
elif type(call.excinfo.value) == _pytest.outcomes.XFailed: # noqa: E721
322322
TEST_PROCESS_STATS.incrementXFailedTestCount(testID)
323323

324324
exitStatus = "XFAILED"
325325
reasonText = str(call.excinfo.value)
326-
reasonMsg = "XFAIL REASON: {0}"
326+
reasonMsgTempl = "XFAIL REASON: {0}"
327327
else:
328328
exitStatus = "XFAILED"
329329
assert hasattr(rep, "wasxfail")
@@ -333,13 +333,16 @@ def helper__makereport__call(
333333
TEST_PROCESS_STATS.incrementXFailedTestCount(testID)
334334

335335
reasonText = rep.wasxfail
336-
reasonMsg = "XFAIL REASON: {0}"
336+
reasonMsgTempl = "XFAIL REASON: {0}"
337337

338338
logging.error(call.excinfo.value)
339339

340+
assert type(reasonText) == str # noqa: E721
341+
340342
if reasonText != "":
343+
assert type(reasonMsgTempl) == str # noqa: E721
341344
logging.info("*")
342-
logging.info("* " + reasonMsg.format(reasonText))
345+
logging.info("* " + reasonMsgTempl.format(reasonText))
343346

344347
elif rep.outcome == "failed":
345348
assert call.excinfo is not None

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy