#NEWLINE# def test_tocsr( self ) : #NEWLINE# #INDENT# TF_expected = [ [ 1 , 1 , 1 , 1 , 1 , 1 ] , [ 1 , 0 , 4 , 0 , 1 , 0 ] , [ 1 , 0 , 2 , 0 , 2 , 1 ] , [ 1 , 0 , 0 , 3 , 2 , 0 ] , [ 1 , 0 , 0 , 4 , 0 , 1 ] ] #NEWLINE# TF = self . model . _TFIDFModel__convert_tocsr ( TF . data . item_tags ) #NEWLINE# self . assertTrue ( np . array_equal ( TF . todense ( ) , TF_expected ) )