#NEWLINE# def test_empty_flow_in_graph_flow( self ) : #NEWLINE# #INDENT# flow = lf . Flow ( 'lf' ) #NEWLINE# a = test_utils . ProvidesRequiresTask ( 'a' , provides = [ 'a' ] , requires = [ ] ) #NEWLINE# b = test_utils . ProvidesRequiresTask ( 'b' , provides = [ ] , requires = [ 'a' ] ) #NEWLINE# empty_flow = lf . Flow ( 'empty' ) #NEWLINE# flow . add ( a , empty_flow , b ) #NEWLINE# compilation = compiler . PatternCompiler ( flow ) . compile ( ) #NEWLINE# g = compilation . execution_graph #NEWLINE# self . assertTrue ( g . has_edge ( flow , a ) ) #NEWLINE# self . assertTrue ( g . has_edge ( a , empty_flow ) ) #NEWLINE# empty_flow_successors = g . successors ( empty_flow ) #NEWLINE# self . assertEqual ( 1 , len ( empty_flow_successors ) ) #NEWLINE# empty_flow_terminal = empty_flow_successors [ 0 ] #NEWLINE# self . assertIs ( empty_flow , empty_flow_terminal . flow ) #NEWLINE# self . assertEqual ( compiler . FLOW_END , g . node [ empty_flow_terminal ] [ 'kind' ] ) #NEWLINE# self . assertTrue ( g . has_edge ( empty_flow_terminal , flow ) )