Skip to content

Commit 5662715

Browse files
author
Tyler Goodlet
committed
Keep _Result.excinfo public; pytest relies on it
1 parent eda95ca commit 5662715

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pluggy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def before(hook_name, methods, kwargs):
460460

461461
def after(outcome, hook_name, methods, kwargs):
462462
if outcome.excinfo is None:
463-
hooktrace("finish", hook_name, "-->", outcome.result)
463+
hooktrace("finish", hook_name, "-->", outcome.get_result())
464464
hooktrace.root.indent -= 1
465465

466466
return self.add_hookcall_monitoring(before, after)

pluggy/callers.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ def __init__(self, result, excinfo):
2929
self._result = result
3030
self._excinfo = excinfo
3131

32+
@property
33+
def excinfo(self):
34+
return self._excinfo
35+
3236
@classmethod
3337
def from_call(cls, func):
3438
__tracebackhide__ = True
@@ -78,7 +82,7 @@ def __init__(self, hook_impls, kwargs, specopts={}, hook=None):
7882
def execute(self):
7983
__tracebackhide__ = True
8084
caller_kwargs = self.caller_kwargs
81-
self._results = results = []
85+
self.results = results = []
8286
firstresult = self.specopts.get("firstresult")
8387
excinfo = None
8488
try: # run impl and wrapper setup functions in a loop

0 commit comments

Comments
 (0)