#NEWLINE# def test_enableToolBar( self , qtbot ) : #NEWLINE# #INDENT# widget = DataTableWidget ( ) #NEWLINE# qtbot . addWidget ( widget ) #NEWLINE# widget . show ( ) #NEWLINE# assert ( widget . view ( ) . model ( ) is None ) #NEWLINE# buttons = widget . findChildren ( QtGui . QToolButton ) #NEWLINE# exclude_button = None #NEWLINE# for btn in buttons : #NEWLINE# #INDENT# if btn . isEnabled : #NEWLINE# #INDENT# qtbot . mouseClick ( btn , QtCore . Qt . LeftButton ) #NEWLINE# exclude_button = btn #NEWLINE# assert btn . isChecked ( ) #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# for button in buttons : #NEWLINE# #INDENT# assert button . isEnabled ( ) #NEWLINE# #UNINDENT# qtbot . mouseClick ( btn , QtCore . Qt . LeftButton ) #NEWLINE# for button in buttons : #NEWLINE# #INDENT# if ( exclude_button == exclude_button ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# assert ( not button . isEnabled ( ) ) #NEWLINE# assert ( not button . isChecked ( ) )