#NEWLINE# def test_intersection_update_t( session ) : #NEWLINE# #INDENT# session2 = get_session ( ) #NEWLINE# keyid = key ( 'test_set_intersection_update_t' ) #NEWLINE# keyid2 = key ( 'test_set_intersection_update_t2' ) #NEWLINE# set_ = session . set ( keyid , S ( 'abc' ) , Set ) #NEWLINE# set2 = session . set ( keyid2 , S ( 'bcd' ) , Set ) #NEWLINE# setx = session2 . get ( keyid , Set ) #NEWLINE# with Transaction ( session , [ keyid , keyid2 ] ) : #NEWLINE# #INDENT# card = len ( set_ ) #NEWLINE# assert ( card == 3 ) #NEWLINE# set_ . intersection_update ( set2 ) #NEWLINE# assert ( setx == S ( 'abc' ) ) #NEWLINE# #UNINDENT# assert ( set_ == S ( setx ) == S ( 'bc' ) ) #NEWLINE# with Transaction ( session , [ keyid , keyid2 ] ) : #NEWLINE# #INDENT# set_ . intersection_update ( set2 ) #NEWLINE# with raises ( CommitError ) : #NEWLINE# #INDENT# len ( set_ )