def test_multi_constructor_obj():
 try:
  load('a: !obj:decimal.Decimal { 1 }')
 except TypeError as e:
  assert (str(e) == 'Received non string object (1) as key in mapping.')
  pass
 except Exception as e:
  error_msg = ('Got the unexpected error: %s' % e)
  reraise_as(ValueError(error_msg))

def test_multi_constructor_obj ( ) : try : load ( 'a: !obj:decimal.Decimal { 1 }' ) except TypeError as e : assert ( str ( e ) == 'Received non string object (1) as key in mapping.' ) pass except Exception as e : error_msg = ( 'Got the unexpected error: %s' % e ) reraise_as ( ValueError ( error_msg ) )
tests whether multi_constructor_obj throws an exception when the keys in mapping are none .