#NEWLINE# def assertDoesNotHaveTrait( self , event , name ) : #NEWLINE# #INDENT# traits = [ trait for trait in event . traits if ( trait . name == name ) ] #NEWLINE# self . assertEqual ( len ( traits ) , 0 , ( 'Extra Trait %s found in event %s' % ( name , event ) ) )