From b077af962021ccecec4bcaa021b22c2470534fee Mon Sep 17 00:00:00 2001 From: "Paul R. Tagliamonte" Date: Mon, 1 Apr 2013 22:13:45 -0400 Subject: [PATCH] more tests --- tests/importer/test_importer.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/importer/test_importer.py b/tests/importer/test_importer.py index 1e8b622..a63c071 100644 --- a/tests/importer/test_importer.py +++ b/tests/importer/test_importer.py @@ -1,10 +1,14 @@ -from hy.importer import import_file_to_module - - -# import_file_to_module +from hy.importer import import_file_to_module, import_string_to_ast +import ast def test_basics(): "Make sure the basics of the importer work" module = import_file_to_module("basic", "tests/resources/importer/basic.hy") + + +def test_stringer(): + "Make sure the basics of the importer work" + _ast = import_string_to_ast("(defn square [x] (* x x))") + assert type(_ast.body[0]) == ast.FunctionDef