Skip to content

Refactor Python Unit Tests #569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nosracd opened this issue Apr 15, 2025 · 0 comments
Open

Refactor Python Unit Tests #569

nosracd opened this issue Apr 15, 2025 · 0 comments

Comments

@nosracd
Copy link
Contributor

nosracd commented Apr 15, 2025

All of the original Python unit tests are run with ctest and set PYTHONPATH to the build directory so the LCM Python module (and a test module, lcmtest) can be imported. In contrast, 072d285 added a Python test which tests some basic functionality of the module and is run by pytest, assuming LCM has already been installed. Since we're building a lot of wheels for a lot of different platforms, the goal of that test was to ensure some basic functionality for each wheel.

This issue proposes we move away from running the Python module from the build directory and lean into the more typical Python approach of using installed modules. To make this work with the older Python unit tests, the following should happen:

  • The proposed changes to the __init__.py in MSVC Support with VCPKG #567 should be reverted
  • The older Python unit tests should be run with pytest rather than ctest
    • PEP-517 style support should be added to the lcmtest Python module so it can be installed
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

No branches or pull requests

1 participant