Skip to content

tests: retire correctness/regression tests covered by C++ gtests#1461

Open
ramakrishnap-nv wants to merge 2 commits into
mainfrom
ci/retire-correctness-regression-tests
Open

tests: retire correctness/regression tests covered by C++ gtests#1461
ramakrishnap-nv wants to merge 2 commits into
mainfrom
ci/retire-correctness-regression-tests

Conversation

@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator

Remove 5 Python tests that assert specific solver output values. The Python test suite should cover API behavior; correctness and regression coverage for these cases already exists in the C++ gtest suite.

Removed tests:

  • test_qp.py::test_solver — asserted QP objective −32 and variable values x1=4, x2=2. QP correctness covered by cpp/tests/linear_programming/qp_test.cu; QP API covered by test_python_API.py::test_quadratic_objective_* tests.
  • test_solver.py::test_solomon — asserted VRPTW objective ~1087.15 and vehicle count ≤12. Routing API covered by test_vehicle_properties.py.
  • test_solver.py::test_pdptw — asserted PDP objective 13.0. Pickup-delivery pairs API covered by test_vehicle_properties.py::test_heterogenous_breaks.
  • test_distance_engine.py::test_compute_cost_matrix — numerical matrix match against reference CSVs. compute_cost_matrix API covered by the kept test_compute_waypoint_sequence_* tests.
  • test_distance_engine.py::test_compute_shortest_path_costs — exact matrix match against hardcoded expected values. Error-path coverage for compute_shortest_path_costs retained in test_target_locations_validity.

Also removes helper functions and imports that were only used by the deleted tests.

Remove 5 Python tests whose only role was asserting specific solver
output values. Correctness for these code paths is already covered by
C++ gtests; the Python suite should focus on API behavior.

- Delete test_qp.py::test_solver — QP objective/variable values covered
  by cpp/tests/linear_programming/qp_test.cu; QP API covered by
  test_python_API.py quadratic_objective/matrix tests
- Remove test_solver.py::test_solomon — VRPTW objective/vehicle count;
  routing API covered by test_vehicle_properties.py
- Remove test_solver.py::test_pdptw — PDP objective value; pickup-
  delivery pairs API covered by test_vehicle_properties.py::test_heterogenous_breaks
- Remove test_distance_engine.py::test_compute_cost_matrix — numerical
  matrix match against reference CSV; compute_cost_matrix API covered
  by test_compute_waypoint_sequence_* tests
- Remove test_distance_engine.py::test_compute_shortest_path_costs —
  exact matrix match; error-path coverage kept in test_target_locations_validity

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ramakrishnap-nv ramakrishnap-nv requested a review from a team as a code owner June 24, 2026 19:45
@ramakrishnap-nv ramakrishnap-nv requested a review from tmckayus June 24, 2026 19:45
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 40b851c2-bd16-4d55-a2a0-c7140aa2502c

📥 Commits

Reviewing files that changed from the base of the PR and between 789b822 and caa7835.

📒 Files selected for processing (1)
  • python/cuopt/cuopt/tests/routing/test_distance_engine.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • python/cuopt/cuopt/tests/routing/test_distance_engine.py

📝 Walkthrough

Walkthrough

The quadratic-programming test module was removed, and two routing test modules were pruned. The routing files also drop unused imports and delete the shortest-path, Solomon, and PDPTW test cases.

Changes

CuOpt test module removals

Layer / File(s) Summary
Distance-engine shortest-path tests
python/cuopt/cuopt/tests/routing/test_distance_engine.py
The import block drops pandas and cuopt.routing.utils, and the shortest-path helper plus test_compute_shortest_path_costs() are removed.
Routing solver cases
python/cuopt/cuopt/tests/routing/test_solver.py
The import block drops os, math, and cuopt.routing.utils, and test_solomon plus test_pdptw are removed before test_prize_collection.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: retiring Python tests already covered by C++ gtests.
Description check ✅ Passed The description is directly related and accurately explains the removed tests and rationale.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/retire-correctness-regression-tests

Comment @coderabbitai help to get the list of available commands.

@ramakrishnap-nv ramakrishnap-nv self-assigned this Jun 24, 2026
@ramakrishnap-nv ramakrishnap-nv added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Jun 24, 2026
@ramakrishnap-nv ramakrishnap-nv requested review from Iroy30 and removed request for tmckayus June 24, 2026 19:54
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant