Skip to content

Skip pydocstyle tests if it can't be imported#579

Merged
cottsay merged 2 commits into
rollingfrom
cottsay/skip-pydocstyle
Apr 23, 2026
Merged

Skip pydocstyle tests if it can't be imported#579
cottsay merged 2 commits into
rollingfrom
cottsay/skip-pydocstyle

Conversation

@cottsay

@cottsay cottsay commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

This change is modeled after ament_cppcheck, which is also skipped on some platforms. Unlike that change, however, we need to handle invocation of ament_pep257 from downstream pytests, so I implemented that using a SkipTest exception and an additional wrapper around main() so that direct ament_pep257 command line invocations still look okay.

The changes to get_xunit_output and addition of write_xunit_output were taken from ament_cppcheck.

This is intended to be a sort of stopgap to get us through the Lyrical release until something more robust like #578 can safely land.

This change is modeled after ament_cppcheck, which is also skipped on
some platforms. Unlike that change, however, we need to handle
invocation of ament_pep257 from downstream pytests, so I implemented
that using a SkipTest exception and an additional wrapper around
`main()` so that direct ament_pep257 command line invocations still look
okay.

The changes to `get_xunit_output` and addition of `write_xunit_output`
were taken from ament_cppcheck.

Signed-off-by: Scott K Logan <logans@cottsay.net>
@cottsay cottsay self-assigned this Apr 22, 2026
Comment thread ament_pep257/ament_pep257/main.py Outdated
Signed-off-by: Scott K Logan <logans@cottsay.net>
@cottsay cottsay force-pushed the cottsay/skip-pydocstyle branch from adb6c0a to 514734b Compare April 23, 2026 00:30
@cottsay

cottsay commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author
  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@cottsay cottsay merged commit 2b2ec7c into rolling Apr 23, 2026
3 checks passed
@cottsay cottsay deleted the cottsay/skip-pydocstyle branch April 23, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants