Skip to content

Commit

Permalink
fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
ipa-rwu committed Feb 27, 2024
1 parent fcc39b2 commit b2e505f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ros2model/api/model_generator/message_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from ament_index_python import get_package_share_directory

Template_Folder_ROS = Path(get_package_share_directory("ros2model") + "/templates")
Template_ROS = Path(Template_Folder_ROS / "message.ros2.j2")
Template_ROS = Path(Template_Folder_ROS / "message.ros.j2")
except ImportError:
Template_ROS = None

Expand All @@ -35,7 +35,7 @@ def __init__(self, template_path=None) -> None:
if template_path != None:
self.template_path = Path(template_path).resolve()
elif Template_ROS != None and Template_ROS.is_file():
self.template_path = Template
self.template_path = Template_ROS
elif Template.is_file():
self.template_path = Template
else:
Expand Down
6 changes: 1 addition & 5 deletions test/unittest/test_generate_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,8 @@
],
)

from devtools import pprint

# pprint(test_model)

test_dir = "test"
output_folder = "outputs"
output_folder = Path(__file__).parent.parent / "output"

expect_result = """
test_model:
Expand Down
2 changes: 1 addition & 1 deletion test/unittest/test_generate_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
)

test_dir = "test"
output_folder = "outputs"
output_folder = Path(__file__).parent.parent / "output"

expect_result = """
test_interfaces:
Expand Down

0 comments on commit b2e505f

Please sign in to comment.