#NEWLINE# def test_astar_undirected3( self ) : #NEWLINE# #INDENT# XG4 = nx . Graph ( ) #NEWLINE# edges = [ ( 0 , 1 , 2 ) , ( 1 , 2 , 2 ) , ( 2 , 3 , 1 ) , ( 3 , 4 , 1 ) , ( 4 , 5 , 1 ) , ( 5 , 6 , 1 ) , ( 6 , 7 , 1 ) , ( 7 , 0 , 1 ) ] #NEWLINE# XG4 . add_weighted_edges_from ( edges ) #NEWLINE# assert_equal ( nx . astar_path ( self , 0 , 2 ) , [ 0 , 1 , 2 ] ) #NEWLINE# assert_equal ( nx . astar_path_length ( XG4 , 0 , 2 ) , 4 )