-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Current Status
Test coverage has been significantly improved from 55% to 79% (+24 points).
Modules at 90%+ Coverage ✅
- config.py: 100%
- processor.py: 100%
- metadata.py: 96%
- server.py: 91%
- include.py: 90%
Remaining Work
cli.py: 55% coverage ⚠️
The main blocker is ~100 lines of interactive CLI code using input() which are difficult to test:
- Lines 189-236: Interactive refresh mode
- Lines 307-358: Interactive apikey management
- Lines 415-520: Interactive serve command setup
These sections prompt the user for input and are hard to test without complex mocking or integration tests.
Possible Approaches
-
Refactor interactive sections to separate I/O from logic (recommended)
- Extract input/output to dedicated functions
- Test business logic separately
-
Mock
input()andprint()in tests- Complex to maintain
- Fragile tests
-
Add integration tests with simulated input
- More realistic but slower
- Requires test infrastructure
-
Accept current coverage as sufficient
- Core logic well tested (90%+ on 5/6 modules)
- Interactive sections are simple and unlikely to break
Recommendation
Refactor interactive sections when modifying CLI, gradually improving coverage. Current 79% coverage is acceptable for core functionality.
Related
- Total test count: 125 passed, 5 skipped
- New test files added: test_include_ai.py, test_include_errors.py, test_include_ai_errors.py, test_server.py
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request