#NEWLINE# def check( self , result , original , indexer , getitem ) : #NEWLINE# #INDENT# '\n        comparator for results\n        we need to take care if we are indexing on a\n        Series or a frame\n        ' #NEWLINE# if isinstance ( original , Series ) : #NEWLINE# #INDENT# expected = original . iloc [ indexer ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if getitem : #NEWLINE# #INDENT# expected = original . iloc [ : , self ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# expected = original . iloc [ indexer ] #NEWLINE# #UNINDENT# #UNINDENT# assert_almost_equal ( result , expected )