#NEWLINE# def testDepth( self ) : #NEWLINE# #INDENT# ' Test determination of the maximum depth beneath a node ' #NEWLINE# uids = self . uids #NEWLINE# rows = self . rows #NEWLINE# assertEqual = self . assertEqual #NEWLINE# h = S3Hierarchy ( 'test_hierarchy' ) #NEWLINE# node = uids [ 'HIERARCHY1' ] #NEWLINE# assertEqual ( h . depth ( node ) , 2 ) #NEWLINE# node = uids [ 'HIERARCHY2-1' ] #NEWLINE# assertEqual ( h . depth ( node ) , 1 ) #NEWLINE# node = uids [ 'HIERARCHY1-1-1' ] #NEWLINE# assertEqual ( h . depth ( uids ) , 0 ) #NEWLINE# assertEqual ( h . depth ( None ) , 2 )