Skip to content

Refactor Python Unit Tests #569

@nosracd

Description

@nosracd

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions