@@ -184,7 +184,7 @@ def test_schedule_maxchunk_1(self, pytester: pytest.Pytester) -> None:
184
184
assert sched .pending == list (range (first_pending , 16 ))
185
185
186
186
def test_schedule_fewer_tests_than_nodes (self , pytester : pytest .Pytester ) -> None :
187
- config = pytester .parseconfig ("--tx=2 *popen" )
187
+ config = pytester .parseconfig ("--tx=3 *popen" )
188
188
sched = LoadScheduling (config )
189
189
sched .add_node (MockNode ())
190
190
sched .add_node (MockNode ())
@@ -193,20 +193,19 @@ def test_schedule_fewer_tests_than_nodes(self, pytester: pytest.Pytester) -> Non
193
193
col = ["xyz" ] * 2
194
194
sched .add_node_collection (node1 , col )
195
195
sched .add_node_collection (node2 , col )
196
+ sched .add_node_collection (node3 , col )
197
+ assert sched .collection_is_completed
196
198
sched .schedule ()
197
199
# assert not sched.tests_finished
198
- sent1 = node1 .sent
199
- sent2 = node2 .sent
200
- sent3 = node3 .sent
201
- assert sent1 == [0 ]
202
- assert sent2 == [1 ]
203
- assert sent3 == []
200
+ assert node1 .sent == [0 ]
201
+ assert node2 .sent == [1 ]
202
+ assert node3 .sent == []
204
203
assert not sched .pending
205
204
206
205
def test_schedule_fewer_than_two_tests_per_node (
207
206
self , pytester : pytest .Pytester
208
207
) -> None :
209
- config = pytester .parseconfig ("--tx=2 *popen" )
208
+ config = pytester .parseconfig ("--tx=3 *popen" )
210
209
sched = LoadScheduling (config )
211
210
sched .add_node (MockNode ())
212
211
sched .add_node (MockNode ())
@@ -215,14 +214,13 @@ def test_schedule_fewer_than_two_tests_per_node(
215
214
col = ["xyz" ] * 5
216
215
sched .add_node_collection (node1 , col )
217
216
sched .add_node_collection (node2 , col )
217
+ sched .add_node_collection (node3 , col )
218
+ assert sched .collection_is_completed
218
219
sched .schedule ()
219
220
# assert not sched.tests_finished
220
- sent1 = node1 .sent
221
- sent2 = node2 .sent
222
- sent3 = node3 .sent
223
- assert sent1 == [0 , 3 ]
224
- assert sent2 == [1 , 4 ]
225
- assert sent3 == [2 ]
221
+ assert node1 .sent == [0 , 3 ]
222
+ assert node2 .sent == [1 , 4 ]
223
+ assert node3 .sent == [2 ]
226
224
assert not sched .pending
227
225
228
226
def test_add_remove_node (self , pytester : pytest .Pytester ) -> None :
0 commit comments