#NEWLINE# def test_is_connected( self ) : #NEWLINE# #INDENT# assert_true ( nx . is_connected ( G . grid ) ) #NEWLINE# G = nx . Graph ( ) #NEWLINE# G . add_nodes_from ( [ 1 , 2 ] ) #NEWLINE# assert_false ( nx . is_connected ( G ) )