style cleanup

This commit is contained in:
Paul Tagliamonte 2013-04-23 19:25:02 -04:00
parent a1cf9e50eb
commit ada946fca8
2 changed files with 5 additions and 2 deletions

View File

@ -534,8 +534,8 @@ class HyASTCompiler(object):
@builds("global")
@checkargs(1)
def compile_global_expression(self,expr):
expr.pop(0) # global
def compile_global_expression(self, expr):
expr.pop(0) # global
e = expr.pop(0)
return ast.Global(names=[ast_str(e)],
lineno=e.start_line,

View File

@ -185,15 +185,18 @@ def test_ast_bad_assert():
cant_compile("(assert)")
cant_compile("(assert 1 2)")
def test_ast_good_global():
"Make sure AST can compile valid global"
hy_compile(tokenize("(global a)"))
def test_ast_bad_global():
"Make sure AST can't compile invalid global"
cant_compile("(global)")
cant_compile("(global foo bar)")
def test_ast_good_lambda():
"Make sure AST can compile valid lambda"
hy_compile(tokenize("(lambda [] 1)"))