File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ def worker_workerfinished(self, node):
182182 self .shouldstop = f"{ node } received keyboard-interrupt"
183183 self .worker_errordown (node , "keyboard-interrupt" )
184184 return
185- if node in self .sched .nodes :
185+ if not self . shouldstop and node in self .sched .nodes :
186186 crashitem = self .sched .remove_node (node )
187187 assert not crashitem , (crashitem , node )
188188 self ._active_nodes .remove (node )
Original file line number Diff line number Diff line change @@ -154,10 +154,12 @@ def pytest_runtestloop(self, session):
154154 self .channel .setcallback (self .handle_command , endmarker = self .SHUTDOWN_MARK )
155155 self .nextitem_index = self ._get_next_item_index ()
156156 while self .nextitem_index is not self .SHUTDOWN_MARK :
157- self .run_one_test (session .shouldfail or session .shouldstop )
157+ self .run_one_test ()
158+ if session .shouldfail or session .shouldstop :
159+ break
158160 return True
159161
160- def run_one_test (self , skip : bool ):
162+ def run_one_test (self ):
161163 self .item_index = self .nextitem_index
162164 self .nextitem_index = self ._get_next_item_index ()
163165
@@ -171,10 +173,7 @@ def run_one_test(self, skip: bool):
171173 worker_title ("[pytest-xdist running] %s" % item .nodeid )
172174
173175 start = time .time ()
174-
175- if not skip :
176- self .config .hook .pytest_runtest_protocol (item = item , nextitem = nextitem )
177-
176+ self .config .hook .pytest_runtest_protocol (item = item , nextitem = nextitem )
178177 duration = time .time () - start
179178
180179 worker_title ("[pytest-xdist idle]" )
You can’t perform that action at this time.
0 commit comments