#NEWLINE# def test_dependent( self ) : #NEWLINE# #INDENT# r = gf . Flow ( 'root' ) #NEWLINE# customer = test_utils . ProvidesRequiresTask ( 'customer' , provides = [ 'dog' ] , requires = [ ] ) #NEWLINE# washer = test_utils . ProvidesRequiresTask ( 'washer' , requires = [ 'dog' ] , provides = [ 'wash' ] ) #NEWLINE# dryer = test_utils . ProvidesRequiresTask ( 'dryer' , requires = [ 'dog' , 'wash' ] , provides = [ 'dry_dog' ] ) #NEWLINE# shaved = test_utils . ProvidesRequiresTask ( 'shaver' , requires = [ 'dry_dog' ] , provides = [ 'shaved_dog' ] ) #NEWLINE# happy_customer = test_utils . ProvidesRequiresTask ( 'happy_customer' , requires = [ 'shaved_dog' ] , provides = [ 'happiness' ] ) #NEWLINE# r . add ( customer , washer , dryer , shaved , happy_customer ) #NEWLINE# c = compiler . PatternCompiler ( r ) . compile ( ) #NEWLINE# self . assertEqual ( [ ] , _get_scopes ( c , customer ) ) #NEWLINE# self . assertEqual ( [ [ 'washer' , 'customer' ] ] , _get_scopes ( c , dryer ) ) #NEWLINE# self . assertEqual ( [ [ 'shaver' , 'dryer' , 'washer' , 'customer' ] ] , _get_scopes ( c , shaved ) )