#NEWLINE# def test_fromindex_index( ) : #NEWLINE# #INDENT# dirname = tempfile . mkdtemp ( ) #NEWLINE# schema = Schema ( title = TEXT ( stored = True ) , path = ID ( stored = True ) , content = TEXT ) #NEWLINE# ix = create_in ( dirname , schema ) #NEWLINE# writer = ix . writer ( ) #NEWLINE# writer . add_document ( title = 'First document' , path = '/a' , content = "This is the first document we've added!" ) #NEWLINE# writer . add_document ( title = 'Second document' , path = '/b' , content = 'The second one is even more interesting!' ) #NEWLINE# writer . commit ( ) #NEWLINE# expect = ( ( 'path' , 'title' ) , ( '/a' , 'First document' ) , ( '/b' , 'Second document' ) ) #NEWLINE# actual = fromtextindex ( ix ) #NEWLINE# ieq ( expect , actual )