#NEWLINE# def test_trivial_maxflow( self ) : #NEWLINE# #INDENT# gr = digraph ( ) #NEWLINE# gr . add_nodes ( [ 0 , 1 , 2 , 3 ] ) #NEWLINE# gr . add_edge ( ( 0 , 1 ) , wt = 5 ) #NEWLINE# gr . add_edge ( ( 1 , 2 ) , wt = 3 ) #NEWLINE# gr . add_edge ( ( 2 , 3 ) , wt = 7 ) #NEWLINE# ( flows , cuts ) = maximum_flow ( gr , 0 , 3 ) #NEWLINE# assert ( flows [ ( 0 , 1 ) ] == 3 ) #NEWLINE# assert ( flows [ ( 1 , 2 ) ] == 3 ) #NEWLINE# assert ( flows [ ( 2 , 3 ) ] == 3 )