[ament_pep257] Errors not shown on colcon test output files
- Ngôn ngữ chính
- Python
- Star
- 50
- Fork
- 129
- Merge trung bình
- 3 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 3
Mô tả
I'm trying to get ament_pep257 output into a Gitlab CI report.
Unlike ament_flake8, which provides the method `main_with_errors()` (which we use as follows)
```
@pytest.mark.flake8
@pytest.mark.linter
def test_flake8():
rc, errors = main_with_errors(argv=[])
assert rc == 0, \
'Found %d code style errors / warnings:\n' % len(errors) + \
'\n'.join(errors)
```
, ament_pep257 does not provide a `main_with_errors()`.
```
@pytest.mark.linter
@pytest.mark.pep257
def test_pep257():
rc = main(argv=['.', 'test'])
assert rc == 0, 'Found code style errors / warnings'
```
Because of this, the output xml for colcon test for a particular package only contains the following:
```
test/test_pep257.py:23: in test_pep257
assert rc == 0, 'Found code style errors / warnings'
E AssertionError: Found code style errors / warnings
E assert 1 == 0
```
I'd like to be able to see the errors like ament_flake8, as follows:
```
E AssertionError: Found 24 code style errors / warnings:
E ./state_machine/state_machine.py:11:100: E501 line too long (112 > 99 characters)
E ./state_machine/state_machine.py:124:100: E501 line too long (101 > 99 characters)
```
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.