testing-conventions 0.0.135

Enforce testing conventions in libraries (Python, TypeScript, and Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Exempt paths are relative to the crate root — the nearest ancestor holding `Cargo.toml` —
# so the same entry resolves whether the gate is pointed at the crate or at `src`.

[rust]
# `run_unit_one_function` in `lib.rs` runs 46 lines and shares its file with `run`.
# At 45 the gate fails; the next ratchet step splits that dispatcher.
one_function_per_file = { max_lines = 46 }

# The provisioning lock's test spawns two real threads and holds the critical section with a
# 50ms sleep: concurrency *is* the subject, so a double would prove nothing, and dropping the
# sleep narrows the race window until a lock-less implementation can pass by luck. Whole-file
# because line-scoped exemptions apply only to `coverage` and `mutation`.
[[rust.exempt]]
path = "src/mutation.rs"
rules = ["no-out-of-module-call", "no-out-of-module-import"]
reason = "the provisioning lock's unit test spawns real threads and sleeps inside the critical section — concurrency is the unit under test, so a double would assert nothing"