#NEWLINE# def test_search( self ) : #NEWLINE# #INDENT# text = self . text #NEWLINE# self . assertRaises ( tkinter . TclError , text . search , None , '1.0' ) #NEWLINE# self . assertRaises ( tkinter . TclError , text . search , 'a' , None ) #NEWLINE# self . assertRaises ( tkinter . TclError , text . search , None , None ) #NEWLINE# self . assertRaises ( tkinter . TclError , text . search , '' , 0 ) #NEWLINE# text . insert ( '1.0' , 'hi-test' ) #NEWLINE# self . assertEqual ( text . search ( '-test' , '1.0' , 'end' ) , '1.2' ) #NEWLINE# self . assertEqual ( text . search ( 'test' , '1.0' , 'end' ) , '1.3' )