-
Notifications
You must be signed in to change notification settings - Fork 185
Description
Feature request
Feature description
New ament_python
packages should include an xmllint test to match the default linters given to ament_cmake packages
Implementation considerations
Copy this file:
https://github.com/ros2/ros2cli/blob/rolling/ros2pkg/test/test_xmllint.py
Here:
https://github.com/ros2/ros2cli/tree/rolling/ros2pkg/ros2pkg/resource/ament_python
Make sure test/test_xmllint.py
is created in new packages here:
ros2cli/ros2pkg/ros2pkg/api/create.py
Lines 173 to 188 in a3198b8
test_directory = _create_folder('test', package_directory) | |
_create_template_file('ament_python', | |
'test_copyright.py.em', | |
test_directory, | |
'test_copyright.py', | |
{}) | |
_create_template_file('ament_python', | |
'test_flake8.py.em', | |
test_directory, | |
'test_flake8.py', | |
{}) | |
_create_template_file('ament_python', | |
'test_pep257.py.em', | |
test_directory, | |
'test_pep257.py', | |
{}) |
Make sure the package.xml
gets a <test_depend>
on ament_xmllint
here:
ros2cli/ros2pkg/ros2pkg/verb/create.py
Lines 140 to 141 in a3198b8
test_dependencies = ['ament_copyright', 'ament_flake8', 'ament_pep257', | |
'python3-pytest'] |
Bonus: create ament_python
equivalent tests with assertion that test/test_xmllint.py
exists here:
ros2cli/ros2pkg/test/test_cli.py
Line 122 in a3198b8
def test_create_package(self): |