def test_preprocessor_exceptions():
 try:
  macroexpand(tokenize('(defn)')[0], HyASTCompiler(__name__))
  assert False
 except HyMacroExpansionError as e:
  assert ('_hy_anon_fn_' not in str(e))
  assert ('TypeError' not in str(e))

def test_preprocessor_exceptions ( ) : try : macroexpand ( tokenize ( '(defn)' ) [ 0 ] , HyASTCompiler ( __name__ ) ) assert False except HyMacroExpansionError as e : assert ( '_hy_anon_fn_' not in str ( e ) ) assert ( 'TypeError' not in str ( e ) )
test that macro expansion raises appropriate exceptions .