Conversation
Verify exit codes, diagnostics, and unchanged cache file contents for incomplete and overlong keys, and missing packages or versions. Relates-to: python-poetry#3155 Assisted-by: OpenAI Codex <noreply@openai.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved review comments; changes are focused test coverage.
Review effort: Lite
Findings: None
What changed in this PR
Adds regression tests for invalid and missing poetry cache clear keys, verifying errors, output, exit codes, and cache preservation.
Changes:
- Adds cache-content snapshot helper.
- Covers incomplete and malformed keys.
- Covers missing packages and versions.
| File | Description |
|---|---|
tests/console/commands/cache/test_clear.py |
Adds six cache-clear edge-case tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Replace the one-second thread join with a direct call using a 30-second subprocess timeout. This tolerates slow runners and terminates the child if the pipe regression actually blocks. Assisted-by: OpenAI Codex <noreply@openai.com>
Copy extended_project into tmp_path before the setup fallback test writes and removes setup.py. This prevents racing the parallel editable installation test while it copies the shared fixture. Assert the build project stays within the per-test directory. Assisted-by: OpenAI Codex <noreply@openai.com>
|
Merged current main and resolved the pipe-test conflict by retaining the upstream regression, including its Thread import. Cache-clear and environment tests pass locally on Homebrew Python 3.14: 59 tests; Ruff check and format check also pass for the relevant files. |
|
Correction: the restored Thread import passed locally but was accidentally left unstaged in the previous merge commit. CI correctly caught that mismatch. It is now included in 33db9ea; the previous failing runs should not be treated as an upstream issue. |
Test-suite maintenance; no production code changes.
cache clearcases for invalid keys and missing packages/versions, checking messages, exit codes, and unchanged cache contents. Module coverage including branches increases from 88% to 97%.setup.pyintmp_path. In that same run, the fallback test created and removed the file in the shared fixture while another worker copied it, causingshutil.Error. An assertion guards against returning to the shared directory; it fails before the fixture change and passes after it.Validation on macOS / Homebrew Python 3.14.6:
Cross-platform CI passed for
a9efcec: Tests run 36313710298, covering Windows, macOS and Ubuntu with Python 3.10–3.15. pre-commit.ci also passed.Prepared with assistance from OpenAI Codex.
Relates-to: #3155