Beispiel #1
0
 def _import_error_test():
     try:
         import_buffer_to_ast("(import \"sys\")", '')
     except HyTypeError:
         return "Error reported"
Beispiel #2
0
def test_stringer():
    _ast = import_buffer_to_ast("(defn square [x] (* x x))", '')
    assert type(_ast.body[0]) == ast.FunctionDef
Beispiel #3
0
 def _import_error_test():
     try:
         import_buffer_to_ast("(import \"sys\")", '')
     except HyTypeError:
         return "Error reported"
Beispiel #4
0
def test_stringer():
    _ast = import_buffer_to_ast("(defn square [x] (* x x))", '')
    assert type(_ast.body[0]) == ast.FunctionDef
Beispiel #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
Beispiel #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