Skip to main content

Module tiers

Module tiers 

Source
Expand description

The standard suite-tier layout, derived from the package root.

The standard places a package’s test suites at fixed locations relative to its package root: colocated unit tests beside the sources, the integration suite in tests/integration/, and the e2e suite in tests/e2e/ (Rust’s cargo layout keeps both out-of-crate suites in the crate root’s tests/). The scans derive those locations from the scanned path and the package’s own manifest — integration lint takes its subjects from the derived suite directories, and the unit-tier scans leave <package root>/tests/ to them.

Functions§

package_root
The package root for scan_root: the nearest directory at or above it holding manifest (pyproject.toml, package.json, or Cargo.toml). The walk stops at a .git boundary so it cannot escape the repository into an unrelated manifest. None when no manifest is found — a loose-script tree, scanned at scan_root directly.
suite_tests_dir
The <package root>/tests/ directory scan_root belongs to, or None for a loose-script tree. The unit-tier scans skip every file under it — that subtree belongs to the suite tiers.