#NEWLINE# def initParser( self , * args , **kwargs ) : #NEWLINE# #INDENT# p = configargparse . ArgParser ( * args , ** kwargs ) #NEWLINE# self . parser = replace_error_method ( p ) #NEWLINE# self . add_arg = self . parser . add_argument #NEWLINE# self . parse = self . parser . parse_args #NEWLINE# self . parse_known = self . parser . parse_known_args #NEWLINE# self . format_values = self . parser . format_values #NEWLINE# self . format_help = self . parser . format_help #NEWLINE# if ( not hasattr ( self , 'assertRegex' ) ) : #NEWLINE# #INDENT# self . assertRegex = self . assertRegexpMatches #NEWLINE# #UNINDENT# if ( not hasattr ( self , 'assertRaisesRegex' ) ) : #NEWLINE# #INDENT# self . assertRaisesRegex = self . assertRaisesRegexp #NEWLINE# #UNINDENT# self . assertParseArgsRaises = functools . partial ( self . assertRaisesRegex , argparse . ArgumentError , callable_obj = self . parse ) #NEWLINE# return self . parser