File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,16 @@ def worker_workerfinished(self, node):
182182 self .shouldstop = f"{ node } received keyboard-interrupt"
183183 self .worker_errordown (node , "keyboard-interrupt" )
184184 return
185- if not self .shouldstop and node in self .sched .nodes :
185+
186+ shouldfail = node .workeroutput ["shouldfail" ]
187+ shouldstop = node .workeroutput ["shouldstop" ]
188+ for shouldx in [shouldfail , shouldstop ]:
189+ if shouldx :
190+ self .shouldstop = shouldx
191+ self ._active_nodes .remove (node )
192+ return
193+
194+ if node in self .sched .nodes :
186195 crashitem = self .sched .remove_node (node )
187196 assert not crashitem , (crashitem , node )
188197 self ._active_nodes .remove (node )
Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ def pytest_sessionstart(self, session):
103103 def pytest_sessionfinish (self , exitstatus ):
104104 # in pytest 5.0+, exitstatus is an IntEnum object
105105 self .config .workeroutput ["exitstatus" ] = int (exitstatus )
106+ self .config .workeroutput ["shouldfail" ] = self .session .shouldfail
107+ self .config .workeroutput ["shouldstop" ] = self .session .shouldstop
106108 yield
107109 self .sendevent ("workerfinished" , workeroutput = self .config .workeroutput )
108110
You can’t perform that action at this time.
0 commit comments