#NEWLINE# def test_digraph_equality_attributes( self ) : #NEWLINE# #INDENT# '\n        Digraph equality test. This one checks node equality. \n        ' #NEWLINE# gr = digraph ( ) #NEWLINE# gr . add_nodes ( [ 0 , 1 , 2 ] ) #NEWLINE# gr . add_edge ( ( 0 , 1 ) ) #NEWLINE# gr . add_node_attribute ( 1 , ( 'a' , 'x' ) ) #NEWLINE# gr . add_node_attribute ( 2 , ( 'b' , 'y' ) ) #NEWLINE# gr . add_edge_attribute ( ( 0 , 1 ) , ( 'c' , 'z' ) ) #NEWLINE# gr2 = deepcopy ( gr ) #NEWLINE# gr3 = deepcopy ( gr ) #NEWLINE# gr3 . del_edge ( ( 0 , 1 ) ) #NEWLINE# gr3 . add_edge ( ( 0 , 1 ) ) #NEWLINE# gr4 = deepcopy ( gr ) #NEWLINE# gr4 . del_edge ( ( 0 , 1 ) ) #NEWLINE# gr4 . add_edge ( ( 0 , 1 ) ) #NEWLINE# gr4 . add_edge_attribute ( ( 0 , 1 ) , ( 'd' , 'k' ) ) #NEWLINE# gr5 = deepcopy ( gr ) #NEWLINE# gr5 . del_node ( 2 ) #NEWLINE# gr5 . add_node ( 2 ) #NEWLINE# gr5 . add_node_attribute ( 0 , ( 'd' , 'k' ) ) #NEWLINE# assert ( gr == gr2 ) #NEWLINE# assert ( gr2 == gr ) #NEWLINE# assert ( gr != gr3 ) #NEWLINE# assert ( gr3 != gr ) #NEWLINE# assert ( gr != gr3 ) #NEWLINE# assert ( gr4 != gr ) #NEWLINE# assert ( gr != gr5 ) #NEWLINE# assert ( gr5 != gr )