#NEWLINE# def testSize_07_large_recursive( self ) : #NEWLINE# #INDENT# n = 500 #NEWLINE# p = makeTDInstance ( ) #NEWLINE# kl = random_node_list ( 0 , n , 0.75 ) #NEWLINE# for ( i , k ) in enumerate ( kl ) : #NEWLINE# #INDENT# p . set ( k , n_root_leaves ) #NEWLINE# #UNINDENT# n_root_leaves = len ( [ k for k in kl if ( '.' not in k ) ] ) #NEWLINE# self . assertEqual ( len ( p ) , n ) #NEWLINE# self . assert_ ( ( p . size ( ) == n ) ) #NEWLINE# self . assert_ ( ( p . size ( recursive = False ) == n_root_leaves ) ) #NEWLINE# self . assert_ ( ( p . size ( recursive = False , branch_mode = 'all' ) == n ) ) #NEWLINE# self . assert_ ( ( p . size ( recursive = False , branch_mode = 'only' ) == ( n - n_root_leaves ) ) )