Skip to content

Rename and split test_mujoco_solver.py by behavior #4198

Description

@eric-heiden

Part of #4191. No public API or functionality changes; the shared compatibility requirements in the tracker apply.

newton/tests/test_mujoco_solver.py contains dozens of test classes covering independent solver behaviors. Rename it to match the SolverMuJoCo naming convention and divide the suite into focused modules.

Scope

  • Start with a mechanical rename to test_solver_mujoco.py, updating repository references, including docs/solvers/mujoco.rst.
  • Move complete classes into test_solver_mujoco_*.py modules for body properties, joint properties, geometry, constraints, contacts, conversion, options, attributes, actuators, and solref behavior.
  • Keep a small core/smoke module at test_solver_mujoco.py.
  • Put shared fixtures/builders/assertions in a non-discovered helper module, such as newton/tests/utils/mujoco.py. Avoid importing discoverable TestCase classes into sibling test modules unnecessarily.
  • Preserve assertions, seeds, parameterization, skip conditions, and setup/teardown lifetime during the move.

Acceptance criteria

  • Compare the discovered test multiset before/after using an explicit old-to-new module mapping; check no missing or accidentally duplicated cases.
  • Account for inherited tests: the initial audit found 272 defined test methods but 296 cases including inherited methods. TestMuJoCoSolverPropertiesBase and its descendants inherit tests; do not silently remove those executions while extracting fixtures.
  • Verify full discovery, targeted -k test_solver_mujoco selection, and direct module execution. Document the intentional test-module rename.
  • Run the moved suite with relevant CPU/CUDA and optional dependency configurations.
  • Keep intentional test deduplication or fixture redesign separate from mechanical moves. Related small MuJoCo test files can remain unchanged unless needed for this split.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions