Skip to content

ros2 pkg create for ament_python packages should include xmllint #944

@sloretz

Description

@sloretz

Feature request

ament/ament_cmake#553

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:

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:

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:

def test_create_package(self):

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions