class_docstr: Tests the env variable or the command line flag to filter tests.
docstr: Tests that the shard file is created with the "list_tests" flag.
docstr_tok: ["Tests","that","the","shard","file","is","created","with","the","``","list_tests","''","flag","."]
code: def testShardStatusFileIsCreatedWithListTests(self):
      """Tests that the shard file is created with the "list_tests" flag."""
  
      shard_status_file = os.path.join(
          gtest_test_utils.GetTempDir(), "shard_status_file2"
      )
      self.assert_(not os.path.exists(shard_status_file))
  
      extra_env = {SHARD_STATUS_FILE_ENV_VAR: shard_status_file}
      try:
          output = InvokeWithModifiedEnv(
              extra_env, RunAndReturnOutput, [LIST_TESTS_FLAG]
          )
      finally:
          # This assertion ensures that Google Test enumerated the tests as
          # opposed to running them.
          self.assert_(
              "[==========]" not in output,
              "Unexpected output during test enumeration.\n"
              "Please ensure that LIST_TESTS_FLAG is assigned the\n"
              "correct flag value for listing Google Test tests.",
          )
  
          self.assert_(os.path.exists(shard_status_file))
          os.remove(shard_status_file)
  
imports: import os
  import re
  import sys
  from googletest.test import gtest_test_utils
label_desc: Use image node_id 25 for calling the GTestFilterUnitTest obj's underlying member method code with example usage: obj.testShardStatusFileIsCreatedWithListTests() without return types