#NEWLINE# def test_walk_indented_toc( self ) : #NEWLINE# #INDENT# pages = [ { #NEWLINE# #INDENT# 'Home' : 'index.md' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'API Guide' : [ { #NEWLINE# #INDENT# 'Running' : 'api-guide/running.md' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'Testing' : 'api-guide/testing.md' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'Debugging' : 'api-guide/debugging.md' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'About' : [ { #NEWLINE# #INDENT# 'Release notes' : 'about/release-notes.md' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'License' : 'about/license.md' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } ] #NEWLINE# expected = [ dedent ( '\n                Home - / [*]\n                API Guide\n                    Running - /api-guide/running/\n                    Testing - /api-guide/testing/\n                    Debugging - /api-guide/debugging/\n                About\n                    Release notes - /about/release-notes/\n                    License - /about/license/\n            ' ) , dedent ( '\n                Home - /\n                API Guide [*]\n                    Running - /api-guide/running/ [*]\n                    Testing - /api-guide/testing/\n                    Debugging - /api-guide/debugging/\n                About\n                    Release notes - /about/release-notes/\n                    License - /about/license/\n            ' ) , dedent ( '\n                Home - /\n                API Guide [*]\n                    Running - /api-guide/running/\n                    Testing - /api-guide/testing/ [*]\n                    Debugging - /api-guide/debugging/\n                About\n                    Release notes - /about/release-notes/\n                    License - /about/license/\n            ' ) , dedent ( '\n                Home - /\n                API Guide [*]\n                    Running - /api-guide/running/\n                    Testing - /api-guide/testing/\n                    Debugging - /api-guide/debugging/ [*]\n                About\n                    Release notes - /about/release-notes/\n                    License - /about/license/\n            ' ) , dedent ( '\n                Home - /\n                API Guide\n                    Running - /api-guide/running/\n                    Testing - /api-guide/testing/\n                    Debugging - /api-guide/debugging/\n                About [*]\n                    Release notes - /about/release-notes/ [*]\n                    License - /about/license/\n            ' ) , dedent ( '\n                Home - /\n                API Guide\n                    Running - /api-guide/running/\n                    Testing - /api-guide/testing/\n                    Debugging - /api-guide/debugging/\n                About [*]\n                    Release notes - /about/release-notes/\n                    License - /about/license/ [*]\n            ' ) ] #NEWLINE# site_navigation = nav . SiteNavigation ( site_navigation ) #NEWLINE# for ( index , page ) in enumerate ( site_navigation . walk_pages ( ) ) : #NEWLINE# #INDENT# self . assertEqual ( str ( site_navigation ) . strip ( ) , expected [ index ] )