Skip to content
This repository was archived by the owner on May 14, 2026. It is now read-only.
This repository was archived by the owner on May 14, 2026. It is now read-only.

Extract long inline mod tests into dedicated test files #358

@zkochan

Description

@zkochan

Background

Some crates have grown long inline #[cfg(test)] mod tests { ... } blocks at the bottom of source files (e.g. crates/package-manager/src/install.rs). The markdown guides in this repo direct test code into dedicated files / module hierarchies once the inline block becomes hard to scan, but the convention is not yet enforced and has drifted in places.

Ask

  • Audit each crate for inline mod tests blocks longer than the size threshold the guides recommend.
  • For each one over the threshold, move the tests into either a sibling tests.rs module file or a tests/ integration directory, whichever the guides prefer for the test's scope.
  • Update the guides if the threshold/style needs to be made more explicit so this doesn't drift again.

This is purely a code-organization change, no behavior change. Should be done as small per-crate PRs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    rustPull requests that update Rust code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions