#NEWLINE# def test_single_source_shortest_path( self ) : #NEWLINE# #INDENT# p = nx . shortest_path ( self . cycle , 0 ) #NEWLINE# assert_equal ( p [ 3 ] , [ 0 , 1 , 2 , 3 ] ) #NEWLINE# assert_equal ( p , nx . single_source_shortest_path ( self . cycle , 0 ) ) #NEWLINE# p = nx . shortest_path ( self . grid , 1 ) #NEWLINE# assert_equal ( p [ 12 ] , [ 1 , 2 , 3 , 4 , 8 , 12 ] ) #NEWLINE# p = nx . shortest_path ( self . cycle , 0 , weight = 'weight' ) #NEWLINE# assert_equal ( p [ 3 ] , [ 0 , 1 , 2 , 3 ] ) #NEWLINE# assert_equal ( p , nx . single_source_dijkstra_path ( self . cycle , 0 ) ) #NEWLINE# p = nx . shortest_path ( self . grid , 1 , weight = 'weight' ) #NEWLINE# assert_equal ( p [ 12 ] , [ 1 , 2 , 3 , 4 , 8 , 12 ] )