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