#NEWLINE# def test_biconnected_component_subgraphs_cycle( ) : #NEWLINE# #INDENT# G = nx . cycle_graph ( 3 ) #NEWLINE# nx . add_cycle ( G , [ 1 , 3 , 4 , 5 ] ) #NEWLINE# Gc = set ( nx . biconnected_component_subgraphs ( G ) ) #NEWLINE# assert_equal ( len ( Gc ) , 2 ) #NEWLINE# ( g1 , g2 ) = Gc #NEWLINE# if ( 0 in g1 ) : #NEWLINE# #INDENT# assert_true ( nx . is_isomorphic ( g1 , nx . Graph ( [ ( 0 , 1 ) , ( 0 , 2 ) , ( 1 , 2 ) ] ) ) ) #NEWLINE# assert_true ( nx . is_isomorphic ( g2 , nx . Graph ( [ ( 1 , 3 ) , ( 1 , 5 ) , ( 3 , 4 ) , ( 4 , 5 ) ] ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert_true ( nx . is_isomorphic ( g1 , nx . Graph ( [ ( 1 , 3 ) , ( 1 , 5 ) , ( 3 , 4 ) , ( 4 , 5 ) ] ) ) ) #NEWLINE# assert_true ( nx . is_isomorphic ( g2 , nx . Graph ( [ ( 0 , 1 ) , ( 0 , 2 ) , ( 1 , 2 ) ] ) ) )