17 lines
636 B
Python
17 lines
636 B
Python
from pathlib import Path
|
|
|
|
|
|
root = Path(__file__).resolve().parents[1]
|
|
source = (root / "launch" / "translator.launch.py").read_text(encoding="utf-8")
|
|
|
|
assert 'get_package_prefix("mtran")' in source
|
|
assert 'get_package_share_directory("mtran")' in source
|
|
assert 'get_package_share_directory("mtran_ros2")' not in source
|
|
assert "_find_workspace_root" not in source
|
|
assert 'package="mtran"' in source
|
|
assert 'package_prefix / "lib" / "mtran" / "mtranserver"' in source
|
|
assert 'package_share / "models"' in source
|
|
assert 'package_share / "mtranserver_config"' in source
|
|
assert 'Path.cwd()' not in source
|
|
assert "/home/hikos/" not in source
|