Fix slow test hitting real ~/.claude/projects#109
Conversation
test_no_arguments_uses_default_or_cwd invoked `main` with no arguments and no isolation, scanning the real ~/.claude/projects directory. On systems with large project histories this caused multi-minute hangs. Monkeypatch get_default_projects_dir to return tmp_path and isolate the cache DB. Test now completes in <1s. Also add "remind user to just ci before push" to CLAUDE.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo modifications: a documentation reminder in CLAUDE.md instructing users to run Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
test_no_arguments_uses_default_or_cwdinvokedmainwith no arguments and no isolation, scanning the real~/.claude/projectsdirectory. On systems with large project histories (~5GB) this caused multi-minute hangs during test runs.get_default_projects_dirto returntmp_pathand isolate the cache DB. Test now completes in <1s.just cibefore pushing.Test plan
uv run pytest test/test_cli.py::TestCLIMainCommand::test_no_arguments_uses_default_or_cwd -v)🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Tests