#NEWLINE# def test_an_exception_in_objecthook1( self ) : #NEWLINE# #INDENT# def f( ) : #NEWLINE# #INDENT# packed = packb ( { #NEWLINE# #INDENT# 1 : { #NEWLINE# #INDENT# '__complex__' : True , #NEWLINE# 'real' : 1 , #NEWLINE# 'imag' : 2 , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# unpackb ( packed , object_hook = self . bad_complex_decoder ) #NEWLINE# #UNINDENT# self . assertRaises ( DecodeError , self )