Skip to content

Stage 1: Fill untested substantive files + revive disabled tests (tracking #391) #392

Description

@Mec-iS

Tracking issue: #391 — Improve test coverage significantly (staged plan).

Scope

Fill the untested substantive files and revive disabled tests. Highest-ROI stage.

Tasks

  • src/linalg/traits/high_order.rs: implement the empty /* TODO: Add tests */ mod tests. Cover all 4 transpose-flag branches of ab ((true,true), (false,true), (true,false), (false,false)) and non-square inputs.
  • src/linear/lasso_optimizer.rs: add direct tests for InteriorPointOptimizer (currently only exercised transitively via lasso.rs::lasso_fit_predict). Cover new, optimize on a small l1-regularized least-squares problem, convergence on a known-answer input.
  • src/error/mod.rs: tests for all Failed constructors (fit, predict, transform, because), every FailedError variant, Display formatting, PartialEq.
  • src/api.rs: trait-coverage tests for UnsupervisedEstimator / SupervisedEstimator / Predictor / Transformer / NoParameters wiring where behavior is testable.
  • src/rand_custom.rs: RNG determinism tests across std_rand (feature) vs SmallRng paths, and seed reproducibility.
  • Revive the 13 commented-out #[test]s across 12 files (mostly disabled serde round-trip tests in decomposition/pca.rs, decomposition/svd.rs, svm/svr.rs, linear/*, dataset/*, svm/search/svc_params.rs). Gate them with #[cfg(feature = "serde")].
  • Fix mis-named tests:
    • src/dataset/diabetes.rs::boston_datasetdiabetes_dataset
    • src/algorithm/sort/quick_sort.rs::with_capacityquick_argsort (copy-paste from heap_select.rs)

Verification

  • cargo test --all-features
  • cargo fmt --all -- --check
  • cargo clippy --all-features -- -Drust-2018-idioms -Dwarnings

Do you want to work on this issue?

yes — PR will target development.

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