Skip to content

Commit

Permalink
Fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisIsKing committed Oct 2, 2024
1 parent 2a147c4 commit 4dfa9f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jac/jaclang/runtimelib/machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,10 @@ def spawn_node(
self,
node_name: str,
attributes: Optional[dict] = None,
module_name: str = "__main__",
) -> NodeArchitype:
"""Spawn a node instance of the given node_name with attributes."""
node_class = self.get_architype("__main__", node_name)
node_class = self.get_architype(module_name, node_name)
if isinstance(node_class, type) and issubclass(node_class, NodeArchitype):
if attributes is None:
attributes = {}
Expand All @@ -170,9 +171,10 @@ def spawn_walker(
self,
walker_name: str,
attributes: Optional[dict] = None,
module_name: str = "__main__",
) -> WalkerArchitype:
"""Spawn a walker instance of the given walker_name."""
walker_class = self.get_architype("__main__", walker_name)
walker_class = self.get_architype(module_name, walker_name)
if isinstance(walker_class, type) and issubclass(walker_class, WalkerArchitype):
if attributes is None:
attributes = {}
Expand Down

0 comments on commit 4dfa9f9

Please sign in to comment.