terminal: fix "(<Skipped instance>)" skip reason in test status line

This commit is contained in:
Ran Benita
2020-12-15 20:16:28 +02:00
parent 9ccbf5b899
commit d46ecbc18b
4 changed files with 30 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ class OutcomeException(BaseException):
self.pytrace = pytrace
def __repr__(self) -> str:
if self.msg:
if self.msg is not None:
return self.msg
return f"<{self.__class__.__name__} instance>"

View File

@@ -1403,4 +1403,6 @@ def _get_raw_skip_reason(report: TestReport) -> str:
_, _, reason = report.longrepr
if reason.startswith("Skipped: "):
reason = reason[len("Skipped: ") :]
elif reason == "Skipped":
reason = ""
return reason