#NEWLINE# def test_isomorphism_iter2( ) : #NEWLINE# #INDENT# for L in range ( 2 , 10 ) : #NEWLINE# #INDENT# g1 = nx . path_graph ( L ) #NEWLINE# gm = iso . GraphMatcher ( g1 , g1 ) #NEWLINE# s = len ( list ( gm . isomorphisms_iter ( ) ) ) #NEWLINE# assert_equal ( s , 2 ) #NEWLINE# #UNINDENT# for L in range ( 3 , 10 ) : #NEWLINE# #INDENT# g1 = nx . cycle_graph ( L ) #NEWLINE# gm = iso . GraphMatcher ( g1 , g1 ) #NEWLINE# s = len ( list ( gm . isomorphisms_iter ( ) ) ) #NEWLINE# assert_equal ( s , ( 2 * L ) )