#NEWLINE# def test_pickle( self ) : #NEWLINE# #INDENT# sym1 = util . symbol ( 'foo' ) #NEWLINE# sym2 = util . symbol ( 'foo' ) #NEWLINE# assert ( sym1 is sym2 ) #NEWLINE# s = util . pickle . dumps ( sym1 ) #NEWLINE# sym3 = util . pickle . loads ( s ) #NEWLINE# for protocol in ( 0 , 1 , 2 ) : #NEWLINE# #INDENT# print ( protocol ) #NEWLINE# serial = util . pickle . dumps ( sym1 ) #NEWLINE# rt = util . pickle . loads ( serial ) #NEWLINE# assert ( rt is sym1 ) #NEWLINE# assert ( sym3 is sym2 )