class_docstr: Tests the --help flag and its equivalent forms.
class_docstr_tok: ["Tests","the","--","help","flag","and","its","equivalent","forms","."]
docstr: Verifies correct behavior when help flag is specified.
  
  The right message must be printed and the tests must
  skipped when the given flag is specified.
  
  Args:
    flag:  A flag to pass to the binary or None.
docstr_tok: ["Verifies","correct","behavior","when","help","flag","is","specified",".","The","right","message","must","be","printed","and","the","tests","must","skipped","when","the","given","flag","is","specified",".","Args",":","flag",":","A","flag","to","pass","to","the","binary","or","None","."]
code: def TestHelpFlag(self, flag):
      """Verifies correct behavior when help flag is specified.
  
      The right message must be printed and the tests must
      skipped when the given flag is specified.
  
      Args:
        flag:  A flag to pass to the binary or None.
      """
  
      exit_code, output = RunWithFlag(flag)
      if HAS_ABSL_FLAGS:
          # The Abseil flags library prints the ProgramUsageMessage() with
          # --help and returns 1.
          self.assertEqual(1, exit_code)
      else:
          self.assertEqual(0, exit_code)
  
      self.assertTrue(HELP_REGEX.search(output), output)
  
      if (
          IS_DARWIN
          or IS_LINUX
          or IS_GNUHURD
          or IS_GNUKFREEBSD
          or IS_OPENBSD
      ):
          self.assertIn(STREAM_RESULT_TO_FLAG, output)
      else:
          self.assertNotIn(STREAM_RESULT_TO_FLAG, output)
  
      if SUPPORTS_DEATH_TESTS and not IS_WINDOWS:
          self.assertIn(DEATH_TEST_STYLE_FLAG, output)
      else:
          self.assertNotIn(DEATH_TEST_STYLE_FLAG, output)
  
file_path: open-asset-importer/contrib/googletest/googletest/test/gtest_help_test.py
imports: import os
  import re
  import sys
  from googletest.test import gtest_test_utils
label_desc: Use image node_id 1 for calling the GTestHelpTest obj's underlying member method code with example usage: obj.TestHelpFlag(flag) without return types