#NEWLINE# def test_pickle_with_data( self ) : #NEWLINE# #INDENT# tr = Layout ( ) #NEWLINE# tr . Example1 . Data = 42 #NEWLINE# tr . Example2 . Data = 'some data' #NEWLINE# dumped = pickle . dumps ( tr ) #NEWLINE# tr2 = pickle . loads ( self ) #NEWLINE# self . assertEqual ( tr . data , OrderedDict ( [ ( ( 'Example1' , 'Data' ) , 42 ) , ( ( 'Example2' , 'Data' ) , 'some data' ) ] ) ) #NEWLINE# self . assertEqual ( tr . data , tr2 . data )