#NEWLINE# def testLineSentenceWorksWithNormalFile( self ) : #NEWLINE# #INDENT# 'Does LineSentence work with a file object argument, rather than filename?' #NEWLINE# with utils . smart_open ( datapath ( 'head500.noblanks.cor' ) ) as orig : #NEWLINE# #INDENT# with utils . smart_open ( datapath ( 'head500.noblanks.cor' ) ) as fin : #NEWLINE# #INDENT# sentences = word2vec . LineSentence ( fin ) #NEWLINE# for words in sentences : #NEWLINE# #INDENT# self . assertEqual ( self , utils . to_unicode ( orig . readline ( ) ) . split ( ) )