#NEWLINE# def test_share_community( self ) : #NEWLINE# #INDENT# for i in range ( 0 , self . NUM_NODES , 2 ) : #NEWLINE# #INDENT# self . assertTrue ( self . cmnties . share_community ( i , ( i + 1 ) ) ) #NEWLINE# self . assertTrue ( self . cmnties . share_community_ ( i , ( i + 1 ) ) ) #NEWLINE# #UNINDENT# for i in range ( self . NUM_NODES ) : #NEWLINE# #INDENT# self . assertTrue ( self . cmnties . share_community ( i , i ) ) #NEWLINE# self . assertTrue ( self . cmnties . share_community_ ( i , i ) ) #NEWLINE# #UNINDENT# for i in range ( ( self . NUM_NODES - 1 ) ) : #NEWLINE# #INDENT# if self . cmnties . share_community ( i , ( i + 1 ) ) : #NEWLINE# #INDENT# self . assertTrue ( self . cmnties . share_community ( ( i + 1 ) , i ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . assertFalse ( self . cmnties . share_community ( ( i + 1 ) , i ) ) #NEWLINE# #UNINDENT# if self . cmnties . share_community_ ( i , ( i + 1 ) ) : #NEWLINE# #INDENT# self . assertTrue ( self . cmnties . share_community_ ( ( i + 1 ) , i ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . assertFalse ( self . cmnties . share_community_ ( ( i + 1 ) , i ) ) #NEWLINE# #UNINDENT# #UNINDENT# for i in range ( self . NUM_NODES ) : #NEWLINE# #INDENT# self . assertFalse ( self . cmnties . share_community ( i , self . NUM_NODES ) ) #NEWLINE# self . assertRaises ( ZenException , self . cmnties . share_community_ , self , self . NUM_NODES )