Exemplo n.º 1
0
 def _import_error_test():
     try:
         import_buffer_to_ast("(import \"sys\")", '')
     except HyTypeError:
         return "Error reported"
Exemplo n.º 2
0
def test_stringer():
    _ast = import_buffer_to_ast("(defn square [x] (* x x))", '')
    assert type(_ast.body[0]) == ast.FunctionDef
Exemplo n.º 3
0
 def _import_error_test():
     try:
         import_buffer_to_ast("(import \"sys\")", '')
     except HyTypeError:
         return "Error reported"
Exemplo n.º 4
0
def test_stringer():
    _ast = import_buffer_to_ast("(defn square [x] (* x x))", '')
    assert type(_ast.body[0]) == ast.FunctionDef
Exemplo n.º 5
0
def test_stringer():
    "Make sure the basics of the importer work"
    _ast = import_buffer_to_ast("(defn square [x] (* x x))")
    assert type(_ast.body[0]) == ast.FunctionDef
Exemplo n.º 6
0
def test_stringer():
    "Make sure the basics of the importer work"
    _ast = import_buffer_to_ast("(defn square [x] (* x x))", '')
    assert type(_ast.body[0]) == ast.FunctionDef