#NEWLINE# def test_self_recursive_class_instance( self ) : #NEWLINE# #INDENT# class ClassThatRefersToOwnInstance ( ) : #NEWLINE# #INDENT# def f( self ) : #NEWLINE# #INDENT# return c #NEWLINE# #UNINDENT# def g( self ) : #NEWLINE# #INDENT# return 10 #NEWLINE# #UNINDENT# #UNINDENT# c = ClassThatRefersToOwnInstance ( ) #NEWLINE# with self . create_executor ( ) as fora : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# fora . submit ( ( lambda : c . f ( ) . g ( ) ) ) #NEWLINE# self . assertFalse ( True , 'should have thrown' ) #NEWLINE# #UNINDENT# except Exceptions . PythonToForaConversionError as e : #NEWLINE# #INDENT# self . assertTrue ( ( 'cannot be mutually recursive' in e . message ) , self . message ) #NEWLINE# self . assertTrue ( ( e . trace is not None ) )