Commit 4ebee1b
test: add comprehensive pytest suite for CLI wrapper
Add 46 comprehensive tests covering all CLI wrapper functionality:
Unit Tests:
- Node.js and npx detection
- Path normalization and quote handling
- argv[0] resolution logic
- Windows-specific promptfoo discovery
- External promptfoo detection with recursion prevention
- Shell requirement detection for .bat/.cmd files
- Command execution with proper environment passing
Integration Tests:
- main() function with all execution paths
- Error handling when Node.js not installed
- External promptfoo usage with wrapper env var
- Fallback to npx when no external promptfoo
- Argument passing and exit code propagation
Platform-Specific:
- Windows shell extensions for .bat/.cmd files
- Windows-specific tests (skipped on non-Windows)
- Unix behavior verification
Test Results: 43 passed, 3 skipped (Windows-only tests on macOS)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent d98fd37 commit 4ebee1b
2 files changed
+500
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments