fix(tests): resolve Windows CI failures#7061
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
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 (4)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughMade sandbox default timeout platform-dependent (uses Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tools/tests/tools/test_file_system_toolkits.py`:
- Line 451: The command string uses sys.executable unquoted which breaks on
Windows when the path contains spaces; update the f-string that builds command
(the line referencing sys.executable and py_script) to quote the interpreter
path and use double quotes for strings so the shell receives a single quoted
executable path, e.g. wrap sys.executable in quotes inside the f-string so the
command becomes something like f'"{sys.executable}" -c "{py_script}"'.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 42062ca6-bcd3-4cb3-9658-b38d5cacc83a
📒 Files selected for processing (4)
core/framework/orchestrator/safe_eval.pycore/tests/test_cli_entry_point.pycore/tests/test_safe_eval.pytools/tests/tools/test_file_system_toolkits.py
4c0a3d4 to
5addb4a
Compare
- test_background_job: use sys.executable and double quotes instead of single-quoted 'python -c' which Windows cmd.exe doesn't understand - test_cli_entry_point: guard against None stdout on Windows with (result.stdout or "").lower() - test_safe_eval: bump DEFAULT_TIMEOUT_MS from 100 to 500 to accommodate slow Windows CI runners where SIGALRM is unavailable
5addb4a to
9691a6c
Compare
Description
Fix 3 test failures that only occur on Windows CI runners.
Type of Change
Related Issues
Partial fix for #7057
Changes Made
test_background_job_start_poll_and_complete: usesys.executableand double quotes instead of single-quotedpython -c '...'which Windowscmd.exedoesn't understand (single quotes aren't string delimiters on Windows)test_module_help/test_hive_help: guard againstNonestdout on Windows with(result.stdout or "").lower()test_and_returns_first_falsy: bumpDEFAULT_TIMEOUT_MSfrom 100 to 500 to accommodate slow Windows CI runners whereSIGALRMis unavailable and fallback polling is usedTesting
Checklist
Summary by CodeRabbit
Chores
Tests
Bug Fixes