We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f087c1e commit dc1d67dCopy full SHA for dc1d67d
pluggy/callers.py
@@ -97,6 +97,10 @@ def execute(self):
97
excinfo = sys.exc_info()
98
finally:
99
outcome = _Result(results, excinfo)
100
+ if firstresult: # first result hooks return a single value
101
+ results = outcome.get_result()
102
+ result = results[0] if results else None
103
+ outcome.force_result(result)
104
105
# run all wrapper post-yield blocks
106
for gen in reversed(teardowns):
@@ -106,10 +110,6 @@ def execute(self):
110
except StopIteration:
107
111
pass
108
112
109
- if firstresult:
- result = outcome.get_result()
- return result[0] if result else None
-
113
return outcome.get_result()
114
115
def __repr__(self):
0 commit comments