#NEWLINE# def test_weakly_connected_components( self ) : #NEWLINE# #INDENT# wcc = nx . weakly_connected_components #NEWLINE# cc = nx . connected_components #NEWLINE# for ( G , C ) in self . gc : #NEWLINE# #INDENT# U = G . to_undirected ( ) #NEWLINE# w = sorted ( [ sorted ( g ) for g in wcc ( G ) ] ) #NEWLINE# c = sorted ( [ sorted ( g ) for g in cc ( U ) ] ) #NEWLINE# assert_equal ( w , c )