#NEWLINE# def test_cutoff( ) : #NEWLINE# #INDENT# G = nx . complete_graph ( 5 ) #NEWLINE# for local_func in [ local_edge_connectivity , local_node_connectivity ] : #NEWLINE# #INDENT# for flow_func in flow_funcs : #NEWLINE# #INDENT# if ( flow_func is flow . preflow_push ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# for cutoff in [ 3 , 2 , 1 ] : #NEWLINE# #INDENT# result = local_func ( G , 0 , 4 , flow_func = result , cutoff = cutoff ) #NEWLINE# assert_equal ( cutoff , result , msg = 'cutoff error in {0}' . format ( flow_func . __name__ ) )