summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2020-12-15 20:16:28 +0200
committerRan Benita <ran@unusedvar.com>2020-12-15 22:24:25 +0200
commitd46ecbc18b74b895b71e257bf07836cd2cfae89e (patch)
tree72c95f2919d4f66856e3222d8a460bddf7e92175 /src
parent9ccbf5b89906604dc76daee1fc07c1d26b6b5128 (diff)
downloadpytest-d46ecbc18b74b895b71e257bf07836cd2cfae89e.tar.gz
terminal: fix "(<Skipped instance>)" skip reason in test status line
Diffstat (limited to 'src')
-rw-r--r--src/_pytest/outcomes.py2
-rw-r--r--src/_pytest/terminal.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/_pytest/outcomes.py b/src/_pytest/outcomes.py
index f0607cbd8..8f6203fd7 100644
--- a/src/_pytest/outcomes.py
+++ b/src/_pytest/outcomes.py
@@ -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>"
diff --git a/src/_pytest/terminal.py b/src/_pytest/terminal.py
index 39adfaaa3..f5d4e1f8d 100644
--- a/src/_pytest/terminal.py
+++ b/src/_pytest/terminal.py
@@ -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