#NEWLINE# def test_dunder_and( self ) : #NEWLINE# #INDENT# ( super_ , sub_ , twin1 , twin2 , unique1 , unique2 ) = self . _create_sets ( ) #NEWLINE# eq_ ( ( sub_ & super_ ) , sub_ ) #NEWLINE# eq_ ( ( super_ & sub_ ) , sub_ ) #NEWLINE# eq_ ( ( twin1 & twin2 ) , twin1 ) #NEWLINE# eq_ ( ( twin2 & twin1 ) , twin1 ) #NEWLINE# empty = util . IdentitySet ( [ ] ) #NEWLINE# eq_ ( ( empty & empty ) , empty ) #NEWLINE# eq_ ( ( unique1 & empty ) , empty ) #NEWLINE# def should_raise( ) : #NEWLINE# #INDENT# not_an_identity_set = object ( ) #NEWLINE# return ( unique1 & not_an_identity_set ) #NEWLINE# #UNINDENT# assert_raises ( TypeError , should_raise )