class_docstr: Tests test shuffling.
class_docstr_tok: ["Tests","test","shuffling","."]
code: def testShuffleRestoresOrderAfterEachIteration(self):
      # Get the test lists in all 3 iterations, using random seed 1, 2,
      # and 3 respectively.  Google Test picks a different seed in each
      # iteration, and this test depends on the current implementation
      # picking successive numbers.  This dependency is not ideal, but
      # makes the test much easier to write.
      [
          tests_in_iteration1,
          tests_in_iteration2,
          tests_in_iteration3,
      ] = GetTestsForAllIterations(
          {}, [ShuffleFlag(), RandomSeedFlag(1), RepeatFlag(3)]
      )
  
      # Make sure running the tests with random seed 1 gets the same
      # order as in iteration 1 above.
      [tests_with_seed1] = GetTestsForAllIterations(
          {}, [ShuffleFlag(), RandomSeedFlag(1)]
      )
      self.assertEqual(tests_in_iteration1, tests_with_seed1)
  
      # Make sure running the tests with random seed 2 gets the same
      # order as in iteration 2 above.  Success means that Google Test
      # correctly restores the test order before re-shuffling at the
      # beginning of iteration 2.
      [tests_with_seed2] = GetTestsForAllIterations(
          {}, [ShuffleFlag(), RandomSeedFlag(2)]
      )
      self.assertEqual(tests_in_iteration2, tests_with_seed2)
  
      # Make sure running the tests with random seed 3 gets the same
      # order as in iteration 3 above.  Success means that Google Test
      # correctly restores the test order before re-shuffling at the
      # beginning of iteration 3.
      [tests_with_seed3] = GetTestsForAllIterations(
          {}, [ShuffleFlag(), RandomSeedFlag(3)]
      )
      self.assertEqual(tests_in_iteration3, tests_with_seed3)
  
imports: import os
  from googletest.test import gtest_test_utils
label_desc: Use image node_id 11 for calling the GTestShuffleUnitTest obj's underlying member method code with example usage: obj.testShuffleRestoresOrderAfterEachIteration() without return types