#NEWLINE# def test_str( self ) : #NEWLINE# #INDENT# expected = [ 'Case:' , '   uuid: sdfsfdasfdasdf' , '   timestamp: 1383239074.309192' , '   inputs:' , '      comp1.a: 2' , '      comp1.a_lst: [4, 5, 6]' , '      comp1.b: 4' , '   outputs:' , '      comp2.c+comp2.d: 12' , '      comp2.c_lst[2]: 24' , '      comp2.d: 8' , '' ] #NEWLINE# for ( i , line ) in enumerate ( str ( self . case ) . split ( '\n' ) ) : #NEWLINE# #INDENT# if expected [ i ] . startswith ( '   uuid:' ) : #NEWLINE# #INDENT# self . assertTrue ( line . startswith ( '   uuid:' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if expected [ i ] . startswith ( '   timestamp:' ) : #NEWLINE# #INDENT# self . assertTrue ( line . startswith ( '   timestamp:' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . assertEqual ( line , expected [ i ] ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# case = Case ( inputs = [ ( 'comp1.a' , 4 ) , ( 'comp1.b' , 8 ) ] , case_uuid = 'abcd-efg' , parent_uuid = 'abc-xyz-pdq' ) #NEWLINE# expected = [ 'Case:' , '   uuid: abcd-efg' , '   timestamp: 1383239074.309192' , '   parent_uuid: abc-xyz-pdq' , '   inputs:' , '      comp1.a: 4' , '      comp1.b: 8' , '' ] #NEWLINE# for ( i , line ) in enumerate ( str ( case ) . split ( '\n' ) ) : #NEWLINE# #INDENT# if expected [ i ] . startswith ( '   timestamp:' ) : #NEWLINE# #INDENT# self . assertTrue ( line . startswith ( '   timestamp:' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . assertEqual ( i , expected [ i ] ) #NEWLINE# #UNINDENT# #UNINDENT# self . assertFalse ( ( case == self . case ) ) #NEWLINE# self . assertTrue ( ( case == case ) ) #NEWLINE# self . assertTrue ( ( case == copy . deepcopy ( case ) ) )