#NEWLINE# def test_astar_w1( self ) : #NEWLINE# #INDENT# G = nx . DiGraph ( ) #NEWLINE# G . add_edges_from ( [ ( 's' , 'u' ) , ( 's' , 'x' ) , ( 'u' , 'v' ) , ( 'u' , 'x' ) , ( 'v' , 'y' ) , ( 'x' , 'u' ) , ( 'x' , 'w' ) , ( 'w' , 'v' ) , ( 'x' , 'y' ) , ( 'y' , 's' ) , ( 'y' , 'v' ) ] ) #NEWLINE# assert_equal ( nx . astar_path ( G , 's' , 'v' ) , [ 's' , 'u' , 'v' ] ) #NEWLINE# assert_equal ( nx . astar_path_length ( G , 's' , 'v' ) , 2 )