#NEWLINE# def test_classes_with_getitems( self ) : #NEWLINE# #INDENT# class C_with_getitem ( ) : #NEWLINE# #INDENT# def __init__( self , m ) : #NEWLINE# #INDENT# self . __m__ = m #NEWLINE# #UNINDENT# def __getitem__( self , ix ) : #NEWLINE# #INDENT# return self . __m__ [ ix ] #NEWLINE# #UNINDENT# #UNINDENT# size = 10 #NEWLINE# c = C_with_getitem ( range ( 10 ) ) #NEWLINE# def f( ix ) : #NEWLINE# #INDENT# return c [ ix ] #NEWLINE# #UNINDENT# for ix in range ( size ) : #NEWLINE# #INDENT# self . equivalentEvaluationTest ( f , ix )