<s> """<STR_LIT>""" <EOL> from StringIO import StringIO <EOL> from prestoadmin . util . parser import LoggingOptionParser <EOL> from prestoadmin . util . hiddenoptgroup import HiddenOptionGroup <EOL> from tests . base_test_case import BaseTestCase <EOL> class TestParser ( BaseTestCase ) : <EOL> def test_print_extended_help ( self ) : <EOL> parser = LoggingOptionParser ( usage = "<STR_LIT>" ) <EOL> parser . add_option_group ( "<STR_LIT:a>" ) <EOL> hidden_group = HiddenOptionGroup ( parser , "<STR_LIT:b>" , suppress_help = True ) <EOL> non_hidden_group = HiddenOptionGroup ( parser , "<STR_LIT:c>" , suppress_help = False ) <EOL> parser . add_option_group ( hidden_group ) <EOL> parser . add_option_group ( non_hidden_group ) <EOL> help_out = StringIO ( ) <EOL> parser . print_help ( help_out ) <EOL> self . assertEqual ( help_out . getvalue ( ) , <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> extended_help_out = StringIO ( ) <EOL> parser . print_extended_help ( extended_help_out ) <EOL> self . assertEqual ( extended_help_out . getvalue ( ) , <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" ) </s>
