#NEWLINE# def test_bad_join_key( self ) : #NEWLINE# #INDENT# x = Data ( id1 = [ 0 , 1 , 2 ] , label = 'x' ) #NEWLINE# y = Data ( id1 = [ 1 , 2 , 3 ] , label = 'y' ) #NEWLINE# with pytest . raises ( ValueError ) as exc : #NEWLINE# #INDENT# x . join_on_key ( x , 'bad_key' , 'id1' ) #NEWLINE# #UNINDENT# assert ( exc . value . args [ 0 ] == 'ComponentID not found in x: bad_key' ) #NEWLINE# with pytest . raises ( ValueError ) as exc : #NEWLINE# #INDENT# x . join_on_key ( y , 'id1' , 'bad_key' ) #NEWLINE# #UNINDENT# assert ( exc . value . args [ 0 ] == 'ComponentID not found in y: bad_key' )