Skip to content

fix: move inline codex-rs/core unit tests into sibling files#14444

Merged
bolinfest merged 1 commit intomainfrom
pr14444
Mar 12, 2026
Merged

fix: move inline codex-rs/core unit tests into sibling files#14444
bolinfest merged 1 commit intomainfrom
pr14444

Conversation

@bolinfest
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest commented Mar 12, 2026

Why

PR #13783 moved the codex.rs unit tests into codex_tests.rs. This applies the same extraction pattern across the rest of codex-rs/core so the production modules stay focused on runtime code instead of large inline test blocks.

Keeping the tests in sibling files also makes follow-up edits easier to review because product changes no longer have to share a file with hundreds or thousands of lines of test scaffolding.

What changed

  • replaced each inline mod tests { ... } in codex-rs/core/src/** with a path-based module declaration
  • moved each extracted unit test module into a sibling *_tests.rs file, using mod_tests.rs for mod.rs modules
  • preserved the existing cfg(...) guards and module-local structure so the refactor remains structural rather than behavioral

Testing

  • cargo test -p codex-core --lib (1653 passed; 0 failed; 5 ignored)
  • just fix -p codex-core
  • cargo fmt --check
  • cargo shear
@bolinfest bolinfest changed the title fix: move codex-rs/core unit tests into sibling files Mar 12, 2026
@bolinfest bolinfest force-pushed the pr14444 branch 2 times, most recently from 19580a6 to f1b8627 Compare March 12, 2026 07:55
@bolinfest bolinfest merged commit 0c8a366 into main Mar 12, 2026
80 of 86 checks passed
@bolinfest bolinfest deleted the pr14444 branch March 12, 2026 15:16
@github-actions github-actions bot locked and limited conversation to collaborators Mar 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants