@@ -275,33 +275,38 @@ def testShuffleRestoresOrderAfterEachIteration(self):
275
275
# iteration, and this test depends on the current implementation
276
276
# picking successive numbers. This dependency is not ideal, but
277
277
# makes the test much easier to write.
278
+ # pylint: disable-next=unbalanced-tuple-unpacking
278
279
[tests_in_iteration1 , tests_in_iteration2 , tests_in_iteration3 ] = (
279
280
GetTestsForAllIterations (
280
281
{}, [ShuffleFlag (), RandomSeedFlag (1 ), RepeatFlag (3 )]))
281
282
282
283
# Make sure running the tests with random seed 1 gets the same
283
284
# order as in iteration 1 above.
284
- [tests_with_seed1 ] = GetTestsForAllIterations (
285
- {}, [ShuffleFlag (), RandomSeedFlag (1 )])
285
+ tests_with_seed1 = GetTestsForAllIterations (
286
+ {}, [ShuffleFlag (), RandomSeedFlag (1 )]
287
+ )[0 ]
286
288
self .assertEqual (tests_in_iteration1 , tests_with_seed1 )
287
289
288
290
# Make sure running the tests with random seed 2 gets the same
289
291
# order as in iteration 2 above. Success means that Google Test
290
292
# correctly restores the test order before re-shuffling at the
291
293
# beginning of iteration 2.
292
- [tests_with_seed2 ] = GetTestsForAllIterations (
293
- {}, [ShuffleFlag (), RandomSeedFlag (2 )])
294
+ tests_with_seed2 = GetTestsForAllIterations (
295
+ {}, [ShuffleFlag (), RandomSeedFlag (2 )]
296
+ )[0 ]
294
297
self .assertEqual (tests_in_iteration2 , tests_with_seed2 )
295
298
296
299
# Make sure running the tests with random seed 3 gets the same
297
300
# order as in iteration 3 above. Success means that Google Test
298
301
# correctly restores the test order before re-shuffling at the
299
302
# beginning of iteration 3.
300
- [tests_with_seed3 ] = GetTestsForAllIterations (
301
- {}, [ShuffleFlag (), RandomSeedFlag (3 )])
303
+ tests_with_seed3 = GetTestsForAllIterations (
304
+ {}, [ShuffleFlag (), RandomSeedFlag (3 )]
305
+ )[0 ]
302
306
self .assertEqual (tests_in_iteration3 , tests_with_seed3 )
303
307
304
308
def testShuffleGeneratesNewOrderInEachIteration (self ):
309
+ # pylint: disable-next=unbalanced-tuple-unpacking
305
310
[tests_in_iteration1 , tests_in_iteration2 , tests_in_iteration3 ] = (
306
311
GetTestsForAllIterations (
307
312
{}, [ShuffleFlag (), RandomSeedFlag (1 ), RepeatFlag (3 )]))
@@ -319,15 +324,18 @@ def testShuffleGeneratesNewOrderInEachIteration(self):
319
324
def testShuffleShardedTestsPreservesPartition (self ):
320
325
# If we run M tests on N shards, the same M tests should be run in
321
326
# total, regardless of the random seeds used by the shards.
322
- [tests1 ] = GetTestsForAllIterations ({TOTAL_SHARDS_ENV_VAR : '3' ,
323
- SHARD_INDEX_ENV_VAR : '0' },
324
- [ShuffleFlag (), RandomSeedFlag (1 )])
325
- [tests2 ] = GetTestsForAllIterations ({TOTAL_SHARDS_ENV_VAR : '3' ,
326
- SHARD_INDEX_ENV_VAR : '1' },
327
- [ShuffleFlag (), RandomSeedFlag (20 )])
328
- [tests3 ] = GetTestsForAllIterations ({TOTAL_SHARDS_ENV_VAR : '3' ,
329
- SHARD_INDEX_ENV_VAR : '2' },
330
- [ShuffleFlag (), RandomSeedFlag (25 )])
327
+ tests1 = GetTestsForAllIterations (
328
+ {TOTAL_SHARDS_ENV_VAR : '3' , SHARD_INDEX_ENV_VAR : '0' },
329
+ [ShuffleFlag (), RandomSeedFlag (1 )],
330
+ )[0 ]
331
+ tests2 = GetTestsForAllIterations (
332
+ {TOTAL_SHARDS_ENV_VAR : '3' , SHARD_INDEX_ENV_VAR : '1' },
333
+ [ShuffleFlag (), RandomSeedFlag (20 )],
334
+ )[0 ]
335
+ tests3 = GetTestsForAllIterations (
336
+ {TOTAL_SHARDS_ENV_VAR : '3' , SHARD_INDEX_ENV_VAR : '2' },
337
+ [ShuffleFlag (), RandomSeedFlag (25 )],
338
+ )[0 ]
331
339
sorted_sharded_tests = tests1 + tests2 + tests3
332
340
sorted_sharded_tests .sort ()
333
341
sorted_active_tests = []
0 commit comments