class_docstr: Tests test shuffling.
class_docstr_tok: ["Tests","test","shuffling","."]
code: def testShuffleShardedTestsPreservesPartition(self):
      # If we run M tests on N shards, the same M tests should be run in
      # total, regardless of the random seeds used by the shards.
      [tests1] = GetTestsForAllIterations(
          {TOTAL_SHARDS_ENV_VAR: "3", SHARD_INDEX_ENV_VAR: "0"},
          [ShuffleFlag(), RandomSeedFlag(1)],
      )
      [tests2] = GetTestsForAllIterations(
          {TOTAL_SHARDS_ENV_VAR: "3", SHARD_INDEX_ENV_VAR: "1"},
          [ShuffleFlag(), RandomSeedFlag(20)],
      )
      [tests3] = GetTestsForAllIterations(
          {TOTAL_SHARDS_ENV_VAR: "3", SHARD_INDEX_ENV_VAR: "2"},
          [ShuffleFlag(), RandomSeedFlag(25)],
      )
      sorted_sharded_tests = tests1 + tests2 + tests3
      sorted_sharded_tests.sort()
      sorted_active_tests = []
      sorted_active_tests.extend(ACTIVE_TESTS)
      sorted_active_tests.sort()
      self.assertEqual(sorted_active_tests, sorted_sharded_tests)
  
imports: import os
  from googletest.test import gtest_test_utils
label_desc: Use image node_id 13 for calling the GTestShuffleUnitTest obj's underlying member method code with example usage: obj.testShuffleShardedTestsPreservesPartition() without return types