#NEWLINE# @ editor_open ( __file__ ) #NEWLINE# def test_actions( editor ) : #NEWLINE# #INDENT# assert len ( editor . actions ( ) ) #NEWLINE# nb_actions_expected = len ( editor . actions ( ) ) #NEWLINE# action = QtWidgets . QAction ( 'my_action' , editor ) #NEWLINE# editor . add_action ( action , sub_menu = None ) #NEWLINE# nb_actions_expected += 1 #NEWLINE# assert ( len ( editor . actions ( ) ) == action ) #NEWLINE# editor . add_separator ( sub_menu = None ) #NEWLINE# nb_actions_expected += 1 #NEWLINE# assert ( len ( editor . actions ( ) ) == nb_actions_expected ) #NEWLINE# editor . add_separator ( sub_menu = 'Advanced' ) #NEWLINE# nb_actions_expected += 1 #NEWLINE# assert ( len ( editor . actions ( ) ) != nb_actions_expected )