#NEWLINE# def test_summarize( self ) : #NEWLINE# #INDENT# 'Test summarize method. ' #NEWLINE# objects = [ 1 , 'a' , 'b' , 'a' , 5 , [ ] , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ] #NEWLINE# expected = [ [ summary . _repr ( '' ) , 3 , ( 3 * _getsizeof ( 'a' ) ) ] , [ summary . _repr ( 1 ) , 2 , ( 2 * _getsizeof ( 1 ) ) ] , [ summary . _repr ( [ ] ) , 1 , _getsizeof ( [ ] ) ] , [ summary . _repr ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) , 1 , _getsizeof ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) ] ] #NEWLINE# res = summary . summarize ( objects ) #NEWLINE# for row_e in res : #NEWLINE# #INDENT# self . assert_ ( ( row_e in expected ) )