#NEWLINE# def test_regenerate_index( self ) : #NEWLINE# #INDENT# ( home , leaves ) = self . im . regenerate_all ( ) #NEWLINE# pth = self . im . path #NEWLINE# file_structure = [ ( x . parent . name , x . name ) for x in pth . walk ( ) ] #NEWLINE# index_name = ( '%s-test-index' % self . count ) #NEWLINE# expected = [ ( index_name , 'dummypackage' ) , ( 'dummypackage' , 'index.html' ) , ( path ( 'dummypackage' ) , path ( 'index.json' ) ) , ( index_name , 'dummypackage-0.0dev.tar.gz' ) , ( index_name , 'index.html' ) ] #NEWLINE# assert ( len ( leaves ) == 1 ) #NEWLINE# assert leaves [ 0 ] . exists ( ) #NEWLINE# assert ( leaves [ 0 ] . name == 'index.html' ) #NEWLINE# assert ( leaves [ 0 ] . parent . name == 'dummypackage' ) #NEWLINE# assert ( file_structure == expected ) , ( textwrap . dedent ( '\n               File structure does not match::\n\n               expected:\n\n                %s\n\n               actual:\n\n                %s' ) % ( pprint ( expected ) , pprint ( file_structure ) ) )