#NEWLINE# def test_getset_set( session ) : #NEWLINE# #INDENT# set_ = session . set ( key ( 'test_session_getset_set' ) , set ( 'abc' ) , SetT ) #NEWLINE# assert isinstance ( set_ , Set ) #NEWLINE# assert ( set ( set_ ) == set ( [ 'a' , 'b' , 'c' ] ) ) #NEWLINE# set_ = session . get ( key ( 'test_session_getset_set' ) , SetT ) #NEWLINE# assert isinstance ( set_ , Set ) #NEWLINE# assert ( set ( set_ ) == set ( [ 'a' , 'b' , 'c' ] ) ) #NEWLINE# with raises ( TypeError ) : #NEWLINE# #INDENT# session . set ( key ( 'test_session_getset_set' ) , 1234 , SetT ) #NEWLINE# #UNINDENT# with raises ( TypeError ) : #NEWLINE# #INDENT# session . set ( key ( 'test_session_getset_set' ) , 'abc' , SetT ) #NEWLINE# #UNINDENT# with raises ( TypeError ) as excinfo : #NEWLINE# #INDENT# session . set ( key ( 'test_session_getset_set' ) , set ( [ 1 , 2 , 3 ] ) , SetT ) #NEWLINE# #UNINDENT# ensure_encoding_error ( excinfo )