From a81a7164208c5a634dce6af87374cf11165a7e0f Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 8 Apr 2013 00:38:55 +0200 Subject: [PATCH] Be sure errors are raised at by compile, not tokenize Signed-off-by: Julien Danjou --- tests/compilers/test_ast.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/compilers/test_ast.py b/tests/compilers/test_ast.py index 31daf14..b8cbcd5 100644 --- a/tests/compilers/test_ast.py +++ b/tests/compilers/test_ast.py @@ -1,4 +1,5 @@ # Copyright (c) 2013 Paul Tagliamonte +# Copyright (c) 2013 Julien Danjou # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), @@ -35,8 +36,9 @@ def _ast_spotcheck(arg, root, secondary): def cant_compile(expr): + expr = tokenize(expr) try: - hy_compile(tokenize(expr)) + hy_compile(expr) assert False except HyCompileError: pass