#NEWLINE# def assert_root_failed( self , walk , node , thrown_type ) : #NEWLINE# #INDENT# 'Asserts that the first Node in a walk was a DependenciesNode with a Throw result.' #NEWLINE# ( root , root_state ) = walk [ 0 ] #NEWLINE# self . assertEquals ( type ( root ) , DependenciesNode ) #NEWLINE# self . assertEquals ( Throw , type ( root_state ) ) #NEWLINE# dependencies = [ ( d , self . pg . state ( d ) ) for d in self . pg . dependencies_of ( root ) ] #NEWLINE# self . assertIn ( ( node , thrown_type ) , [ ( k , type ( v . exc ) ) for ( k , v ) in dependencies if ( type ( v ) is Throw ) ] )