Skip to content

Commit

Permalink
✅ Cover new support for ProcessDef
Browse files Browse the repository at this point in the history
  • Loading branch information
valentingol committed Dec 18, 2023
1 parent 70a9798 commit fb17284
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/unit/processing/test_ast_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ def test_ast_parser() -> None:
result = _process_node(node=tree.body, flat_dict=flat_dict)
check.equal(result, ({"list": [11, 17]}, 2))

flat_dict = {"a": {"b": 1}}
expr = "list(a.keys())"
tree = ast.parse(expr, mode="eval")
result = _process_node(node=tree.body, flat_dict=flat_dict)
check.equal(result, ["b"])

flat_dict = {"elems": [1, 2, 3], "val": 5}
expr = "np.array(elems + [random.randint(0, val)]), np.random.randint(0, 5)"
tree = ast.parse(expr, mode="eval")
Expand Down

0 comments on commit fb17284

Please sign in to comment.