コード例 #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
ファイル: test_importer.py プロジェクト: kartikm/hy
 def _import_error_test():
     try:
         import_buffer_to_ast("(import \"sys\")", '')
     except HyTypeError:
         return "Error reported"
コード例 #4
0
ファイル: test_importer.py プロジェクト: kartikm/hy
def test_stringer():
    _ast = import_buffer_to_ast("(defn square [x] (* x x))", '')
    assert type(_ast.body[0]) == ast.FunctionDef
コード例 #5
0
ファイル: test_importer.py プロジェクト: eigenhombre/hy
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