#NEWLINE# def test_all_instantiable( self ) : #NEWLINE# #INDENT# 'Test if all the TVTK classes can be instantiated' #NEWLINE# errors = [ ] #NEWLINE# for name in self . names : #NEWLINE# #INDENT# klass = getattr ( vtk , name ) #NEWLINE# tvtk_name = get_tvtk_name ( name ) #NEWLINE# tvtk_klass = getattr ( tvtk , tvtk_name , None ) #NEWLINE# if ( hasattr ( klass , '__bases__' ) and ( tvtk_klass is not None ) ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# klass ( ) #NEWLINE# #UNINDENT# except ( TypeError , NotImplementedError ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# tvtk_klass ( ) #NEWLINE# #UNINDENT# except TraitError : #NEWLINE# #INDENT# errors . append ( traceback . format_exc ( ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( len ( errors ) > 0 ) : #NEWLINE# #INDENT# message = 'Not all classes could be instantiated:\n{0}\n' #NEWLINE# raise AssertionError ( message . format ( '' . join ( errors ) ) )