def test_import_error_reporting():
 def _import_error_test():
  try:
   import_buffer_to_ast('(import "sys")', '')
  except HyTypeError:
   return 'Error reported'
 assert (_import_error_test() == 'Error reported')
 assert (_import_error_test() is not None)

def test_import_error_reporting ( ) : def _import_error_test ( ) : try : import_buffer_to_ast ( '(import "sys")' , '' ) except HyTypeError : return 'Error reported' assert ( _import_error_test ( ) == 'Error reported' ) assert ( _import_error_test ( ) is not None )
make sure that reports errors correctly .