#NEWLINE# def test_set_and_clear( self ) : #NEWLINE# #INDENT# evt = self . eventtype ( ) #NEWLINE# results = [ ] #NEWLINE# N = 5 #NEWLINE# def f( ) : #NEWLINE# #INDENT# results . append ( evt . wait ( 1 ) ) #NEWLINE# #UNINDENT# b = Bunch ( f , self ) #NEWLINE# b . wait_for_started ( ) #NEWLINE# time . sleep ( 0.5 ) #NEWLINE# evt . set ( ) #NEWLINE# evt . clear ( ) #NEWLINE# b . wait_for_finished ( ) #NEWLINE# self . assertEqual ( results , ( [ True ] * N ) )