mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-26 01:12:21 +00:00
* refactor(rust): move tests.rs files inline or under tests/ Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * refactor(rust): move tests.rs files inline or under tests/ Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * refactor(rust): inline path-included test files into their owning src files Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * chore(rust): drop stray proptest regression file Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(rust): cover lowercase, empty and non-authorization headers in bearer detection Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Yujong Lee <yujong@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
814 B
814 B
Rust workspace rules
Test placement
- Never create a
tests.rs(ortest.rs) file undersrc/, and never#[path = "tests.rs"] mod tests; - A test that reaches private items lives inline, in a
#[cfg(test)] mod tests { ... }at the bottom of the file that owns those items - A test that only uses the crate's public API lives in
crates/<crate>/tests/<subject>.rs, next tosrc/ - Split a mixed test file along that line instead of widening visibility to move it
- A test for another crate's item belongs in that crate, not in a downstream one
- Never set
autotests = falseor hand-list[[test]]targets; every file directly undertests/is discovered by cargo, and a shared helper goes intests/<name>/mod.rsortests/<subject>/support.rsso it is not picked up as a test crate of its own