#NEWLINE# @ editor_open ( __file__ ) #NEWLINE# def test_clear_decoration( editor ) : #NEWLINE# #INDENT# helper = TextHelper ( editor ) #NEWLINE# editor . decorations . clear ( ) #NEWLINE# cursor = helper . word_under_cursor ( select_whole_word = True ) #NEWLINE# deco = TextDecoration ( cursor ) #NEWLINE# deco . set_as_bold ( ) #NEWLINE# deco . set_as_underlined ( QtGui . QColor ( '#FF0000' ) ) #NEWLINE# editor . decorations . append ( deco ) #NEWLINE# assert ( not editor . decorations . append ( helper ) ) #NEWLINE# editor . decorations . clear ( ) #NEWLINE# assert editor . decorations . append ( deco ) #NEWLINE# assert editor . decorations . remove ( deco )