#NEWLINE# def test_discard( session ) : #NEWLINE# #INDENT# set_ = session . set ( key ( 'test_set_discard' ) , S ( 'abc' ) , Set ) #NEWLINE# set_ . discard ( 'a' ) #NEWLINE# assert ( set_ == S ( 'bc' ) ) #NEWLINE# set_ . discard ( 'a' ) #NEWLINE# assert ( set_ == S ( 'bc' ) ) #NEWLINE# set_ . discard ( 1 ) #NEWLINE# assert ( set_ == S ( 'bc' ) ) #NEWLINE# setx = session . set ( key ( 'test_setx_discard' ) , S ( [ 1 , 2 , 3 ] ) , IntSet ) #NEWLINE# setx . discard ( 1 ) #NEWLINE# assert ( setx == S ( [ 2 , 3 ] ) ) #NEWLINE# setx . discard ( 1 ) #NEWLINE# assert ( setx == S ( [ 2 , 3 ] ) ) #NEWLINE# setx . discard ( 'a' ) #NEWLINE# assert ( setx == S ( [ 2 , 3 ] ) )