
"""Test that we can generate help for PKB."""

import os
import unittest

from perfkitbenchmarker import flags
# Import pkb to add all flag definitions to flags.FLAGS.
from perfkitbenchmarker import pkb  # NOQA


class HelpTest(unittest.TestCase):
  def testHelp(self):
    # Test that help generation finishes without errors
    flags.FLAGS.GetHelp()


class HelpXMLTest(unittest.TestCase):
  def testHelpXML(self):
    with open(os.devnull, 'w') as out:
      flags.FLAGS.WriteHelpInXMLFormat(outfile=out)


if __name__ == '__main__':
  unittest.main()


"""Test that we can generate help for PKB."""

import os
import unittest

from perfkitbenchmarker import flags
# Import pkb to add all flag definitions to flags.FLAGS.
from perfkitbenchmarker import pkb  # NOQA


class HelpTest(unittest.TestCase):
  def testHelp(self):
    # Test that help generation finishes without errors
    if hasattr(flags.FLAGS, 'get_help'):
      flags.FLAGS.get_help()
    else:
      flags.FLAGS.GetHelp()


class HelpXMLTest(unittest.TestCase):
  def testHelpXML(self):
    with open(os.devnull, 'w') as out:
      flags.FLAGS.WriteHelpInXMLFormat(outfile=out)


if __name__ == '__main__':
  unittest.main()

Call FLAGS.get_help if it's available.
Call FLAGS.get_help if it's available.

  
  """Test that we can generate help for PKB."""
  
  import os
  import unittest
  
  from perfkitbenchmarker import flags
  # Import pkb to add all flag definitions to flags.FLAGS.
  from perfkitbenchmarker import pkb  # NOQA
  
  
  class HelpTest(unittest.TestCase):
    def testHelp(self):
      # Test that help generation finishes without errors
+     if hasattr(flags.FLAGS, 'get_help'):
+       flags.FLAGS.get_help()
+     else:
-     flags.FLAGS.GetHelp()
+       flags.FLAGS.GetHelp()
  
  
  class HelpXMLTest(unittest.TestCase):
    def testHelpXML(self):
      with open(os.devnull, 'w') as out:
        flags.FLAGS.WriteHelpInXMLFormat(outfile=out)
  
  
  if __name__ == '__main__':
    unittest.main()
  
Call FLAGS.get_help if it's available.
## Code Before:

"""Test that we can generate help for PKB."""

import os
import unittest

from perfkitbenchmarker import flags
# Import pkb to add all flag definitions to flags.FLAGS.
from perfkitbenchmarker import pkb  # NOQA


class HelpTest(unittest.TestCase):
  def testHelp(self):
    # Test that help generation finishes without errors
    flags.FLAGS.GetHelp()


class HelpXMLTest(unittest.TestCase):
  def testHelpXML(self):
    with open(os.devnull, 'w') as out:
      flags.FLAGS.WriteHelpInXMLFormat(outfile=out)


if __name__ == '__main__':
  unittest.main()

## Instruction:
Call FLAGS.get_help if it's available.
## Code After:

"""Test that we can generate help for PKB."""

import os
import unittest

from perfkitbenchmarker import flags
# Import pkb to add all flag definitions to flags.FLAGS.
from perfkitbenchmarker import pkb  # NOQA


class HelpTest(unittest.TestCase):
  def testHelp(self):
    # Test that help generation finishes without errors
    if hasattr(flags.FLAGS, 'get_help'):
      flags.FLAGS.get_help()
    else:
      flags.FLAGS.GetHelp()


class HelpXMLTest(unittest.TestCase):
  def testHelpXML(self):
    with open(os.devnull, 'w') as out:
      flags.FLAGS.WriteHelpInXMLFormat(outfile=out)


if __name__ == '__main__':
  unittest.main()
