class_docstr: Unit test for Google Test's JSON output functionality.
class_docstr_tok: ["Unit","test","for","Google","Test","'s","JSON","output","functionality","."]
docstr: Verifies the default output file name.
  
  Confirms that Google Test produces an JSON output file with the expected
  default name if no name is explicitly specified.
docstr_tok: ["Verifies","the","default","output","file","name",".","Confirms","that","Google","Test","produces","an","JSON","output","file","with","the","expected","default","name","if","no","name","is","explicitly","specified","."]
code: def testDefaultOutputFile(self):
      """Verifies the default output file name.
  
      Confirms that Google Test produces an JSON output file with the expected
      default name if no name is explicitly specified.
      """
      output_file = os.path.join(
          gtest_test_utils.GetTempDir(), GTEST_DEFAULT_OUTPUT_FILE
      )
      gtest_prog_path = gtest_test_utils.GetTestExecutablePath(
          "gtest_no_test_unittest"
      )
      try:
          os.remove(output_file)
      except OSError:
          e = sys.exc_info()[1]
          if e.errno != errno.ENOENT:
              raise
  
      p = gtest_test_utils.Subprocess(
          [gtest_prog_path, "%s=json" % GTEST_OUTPUT_FLAG],
          working_dir=gtest_test_utils.GetTempDir(),
      )
      self.assertTrue(p.exited)
      self.assertEqual(0, p.exit_code)
      self.assertTrue(os.path.isfile(output_file))
  
file_path: googletest/googletest/test/googletest-json-output-unittest.py
imports: import datetime
  import errno
  import json
  import os
  import re
  import sys
  from googletest.test import gtest_json_test_utils
  from googletest.test import gtest_test_utils
label_desc: Use image node_id 3 for calling the GTestJsonOutputUnitTest obj's underlying member method code with example usage: obj.testDefaultOutputFile() without return types