-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Thanks for putting this package together.
Can you also add documentation for how to use this package as part of a python based ROS package?
Considering it's a python formatter, it would be great to show how to use it in a standard ROS python package.
So far, I've have this. I can format the code with ament_black, but then the test fails. It can't tell why, only the number of failures are reported.
package.xml
<test_depend>ament_black</test_depend>setup.py
from setuptools import setup
setup(
....
tests_require=['pytest'],
)test/test_black.py
from ament_black.main import main
import pytest
@pytest.mark.linter
def test_black():
rc = main()
assert rc == 0, "Found %d code style errors:"Results
$ colcon test-result --all --verbose
build/vcgencmd/pytest.xml: 3 tests, 0 errors, 1 failure, 1 skipped
- vcgencmd.test.test_black test_black
<<< failure message
AssertionError: Found %d code style errors:
assert 1 == 0
>>>
Summary: 3 tests, 0 errors, 1 failure, 1 skippedReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels