#NEWLINE# def report_steps_by_type( self ) : #NEWLINE# #INDENT# '\n        Show an overview of the existing step implementations per step type.\n        ' #NEWLINE# assert ( set ( self . step_types ) == set ( self . step_registry . steps . keys ( ) ) ) #NEWLINE# language = ( self . config . lang or 'en' ) #NEWLINE# language_keywords = i18n . languages [ language ] #NEWLINE# for step_type in self . step_types : #NEWLINE# #INDENT# steps = list ( self . step_registry . steps [ step_type ] ) #NEWLINE# if ( step_type != 'step' ) : #NEWLINE# #INDENT# steps . extend ( self . step_registry . steps [ 'step' ] ) #NEWLINE# #UNINDENT# if ( not steps ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# step_type_name = step_type . upper ( ) #NEWLINE# if ( step_type == 'step' ) : #NEWLINE# #INDENT# step_keyword = '*' #NEWLINE# step_type_name = 'GENERIC' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# keywords = language_keywords [ step_type ] #NEWLINE# if ( keywords [ 0 ] == '*' ) : #NEWLINE# #INDENT# assert ( len ( keywords ) > 1 ) #NEWLINE# step_keyword = keywords [ 1 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# step_keyword = keywords [ 0 ] #NEWLINE# #UNINDENT# #UNINDENT# steps_text = [ ( '%s %s' % ( step_keyword , step . string ) ) for step in steps ] #NEWLINE# if self . shows_location : #NEWLINE# #INDENT# max_size = compute_words_maxsize ( steps_text ) #NEWLINE# if ( max_size < self . min_location_column ) : #NEWLINE# #INDENT# max_size = self . min_location_column #NEWLINE# #UNINDENT# schema = ( ( '  %-' + _text ( max_size ) ) + 's  # %s\n' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# schema = '  %s\n' #NEWLINE# #UNINDENT# message = '%s STEP DEFINITIONS[%s]:\n' #NEWLINE# self . stream . write ( ( message % ( step_type_name , len ( steps ) ) ) ) #NEWLINE# for ( step , step_text ) in zip ( steps , steps_text ) : #NEWLINE# #INDENT# if self . shows_location : #NEWLINE# #INDENT# self . stream . write ( ( schema % ( step_text , step . location ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . stream . write ( ( schema % step_text ) ) #NEWLINE# #UNINDENT# #UNINDENT# self . stream . write ( '\n' )