#NEWLINE# def test_smart_run( self ) : #NEWLINE# #INDENT# 'Test whether a full run with the smart mode works.' #NEWLINE# view = self . view #NEWLINE# regions = list ( self . start_regions ) #NEWLINE# view . run_command ( 'selection_fields' , { #NEWLINE# #INDENT# 'mode' : 'smart' , #NEWLINE# #UNINDENT# } ) #NEWLINE# for i in range ( len ( regions ) ) : #NEWLINE# #INDENT# self . assertEqual ( len ( view . sel ( ) ) , 1 ) #NEWLINE# self . assertEqual ( view . sel ( ) [ 0 ] , regions [ i ] ) #NEWLINE# stored_regions = view . get_regions ( 'meu_sf_stored_selections' ) #NEWLINE# self . assertSelectionEqual ( ( regions [ : i ] + regions [ ( i + 1 ) : ] ) , stored_regions ) #NEWLINE# view . run_command ( 'selection_fields' , { #NEWLINE# #INDENT# 'mode' : 'smart' , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# self . assertSelectionEqual ( view . sel ( ) , regions )