-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,10 +1,14 @@ | |||
from hy.importer import import_file_to_module | from hy.importer import import_file_to_module, import_string_to_ast | ||
|
import ast | ||
|
|||
# import_file_to_module | |||
|
|
||
|
|
||
def test_basics(): | def test_basics(): | ||
"Make sure the basics of the importer work" | "Make sure the basics of the importer work" | ||
module = import_file_to_module("basic", | module = import_file_to_module("basic", | ||
"tests/resources/importer/basic.hy") | "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 |