#NEWLINE# def test_symmetric_difference( self ) : #NEWLINE# #INDENT# ( _ , _ , twin1 , twin2 , _ , _ ) = self . _create_sets ( ) #NEWLINE# set1 = util . IdentitySet ( [ 1 , 2 , 3 ] ) #NEWLINE# set2 = util . IdentitySet ( [ 2 , 3 , 4 ] ) #NEWLINE# eq_ ( set1 . symmetric_difference ( set1 ) , util . IdentitySet ( [ 1 , 4 ] ) ) #NEWLINE# eq_ ( set2 . symmetric_difference ( set1 ) , util . IdentitySet ( [ 1 , 4 ] ) ) #NEWLINE# empty = util . IdentitySet ( [ ] ) #NEWLINE# eq_ ( empty . symmetric_difference ( empty ) , empty ) #NEWLINE# eq_ ( twin1 . symmetric_difference ( twin2 ) , empty ) #NEWLINE# eq_ ( twin2 . symmetric_difference ( twin1 ) , empty ) #NEWLINE# unique1 = util . IdentitySet ( [ 1 ] ) #NEWLINE# unique2 = util . IdentitySet ( [ 2 ] ) #NEWLINE# eq_ ( unique1 . symmetric_difference ( unique2 ) , util . IdentitySet ( [ 1 , 2 ] ) ) #NEWLINE# eq_ ( unique2 . symmetric_difference ( unique1 ) , util . IdentitySet ( [ 1 , 2 ] ) ) #NEWLINE# not_an_identity_set = object ( ) #NEWLINE# assert_raises ( TypeError , unique1 . symmetric_difference , not_an_identity_set )