#NEWLINE# def test_shortest( self ) : #NEWLINE# #INDENT# g = build_graph ( 'ab ac ad bc dc' ) #NEWLINE# d = { #NEWLINE# #INDENT# ( 'a' , 'b' ) : ( 1 , 'b' ) , #NEWLINE# ( 'a' , 'c' ) : ( 1 , 'c' ) , #NEWLINE# ( 'a' , 'd' ) : ( 1 , 'd' ) , #NEWLINE# ( 'b' , 'c' ) : ( 1 , 'c' ) , #NEWLINE# ( 'd' , 'c' ) : ( 1 , 'c' ) , #NEWLINE# #UNINDENT# } #NEWLINE# g . all_pairs_shortest_path = ( lambda * al : d ) #NEWLINE# g . is_stuck = ( lambda * al : False ) #NEWLINE# p = planning . Goto ( 'c' ) #NEWLINE# plan = p ( g , EhmNo ( ) , 'a' , '<context>' ) #NEWLINE# self . assertEqual ( [ x [ 0 ] for x in plan ] , [ 'ac' , 'c' ] )