#NEWLINE# def test_number_of_cliques( self ) : #NEWLINE# #INDENT# G = self . G #NEWLINE# assert_equal ( nx . graph_number_of_cliques ( G ) , 5 ) #NEWLINE# assert_equal ( nx . graph_number_of_cliques ( G , cliques = self . cl ) , 5 ) #NEWLINE# assert_equal ( nx . number_of_cliques ( G , 1 ) , 1 ) #NEWLINE# assert_equal ( list ( nx . number_of_cliques ( G , [ 1 ] ) . values ( ) ) , [ 1 ] ) #NEWLINE# assert_equal ( list ( nx . number_of_cliques ( G , [ 1 , 2 ] ) . values ( ) ) , [ 1 , 2 ] ) #NEWLINE# assert_equal ( nx . number_of_cliques ( G , [ 1 , 2 ] ) , { #NEWLINE# #INDENT# 1 : 1 , #NEWLINE# 2 : 2 , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert_equal ( nx . number_of_cliques ( G , 2 ) , 2 ) #NEWLINE# assert_equal ( nx . number_of_cliques ( G ) , { #NEWLINE# #INDENT# 1 : 1 , #NEWLINE# 2 : 2 , #NEWLINE# 3 : 1 , #NEWLINE# 4 : 2 , #NEWLINE# 5 : 1 , #NEWLINE# 6 : 2 , #NEWLINE# 7 : 1 , #NEWLINE# 8 : 1 , #NEWLINE# 9 : 1 , #NEWLINE# 10 : 1 , #NEWLINE# 11 : 1 , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert_equal ( nx . number_of_cliques ( G , nodes = G . nodes ( ) ) , { #NEWLINE# #INDENT# 1 : 1 , #NEWLINE# 2 : 2 , #NEWLINE# 3 : 1 , #NEWLINE# 4 : 2 , #NEWLINE# 5 : 1 , #NEWLINE# 6 : 2 , #NEWLINE# 7 : 1 , #NEWLINE# 8 : 1 , #NEWLINE# 9 : 1 , #NEWLINE# 10 : 1 , #NEWLINE# 11 : 1 , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert_equal ( nx . number_of_cliques ( G , nodes = [ 2 , 3 , 4 ] ) , { #NEWLINE# #INDENT# 2 : 2 , #NEWLINE# 3 : 1 , #NEWLINE# 4 : 2 , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert_equal ( nx . number_of_cliques ( G , cliques = self . cl ) , { #NEWLINE# #INDENT# 1 : 1 , #NEWLINE# 2 : 2 , #NEWLINE# 3 : 1 , #NEWLINE# 4 : 2 , #NEWLINE# 5 : 1 , #NEWLINE# 6 : 2 , #NEWLINE# 7 : 1 , #NEWLINE# 8 : 1 , #NEWLINE# 9 : 1 , #NEWLINE# 10 : 1 , #NEWLINE# 11 : 1 , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert_equal ( nx . number_of_cliques ( G , G . nodes ( ) , cliques = self . cl ) , { #NEWLINE# #INDENT# 1 : 1 , #NEWLINE# 2 : 2 , #NEWLINE# 3 : 1 , #NEWLINE# 4 : 2 , #NEWLINE# 5 : 1 , #NEWLINE# 6 : 2 , #NEWLINE# 7 : 1 , #NEWLINE# 8 : 1 , #NEWLINE# 9 : 1 , #NEWLINE# 10 : 1 , #NEWLINE# 11 : 1 , #NEWLINE# #UNINDENT# } )