Files
markitect-main/tests/test_issue_13_cache_info_command.py
tegwick f4b32ded8a fix: Complete Phase 1.1 - MagicMock directory pollution cleanup
PHASE 1.1 IMPLEMENTATION SUMMARY:
 Removed 200+ MagicMock pollution directories
 Fixed improper Path mocking in test_issue_13_cache_info_command.py
 Improved test mocking patterns (patch cache service vs global Path)
 Maintained 100% test success rate (307/307 tests passing)
 Prevented future pollution with better mocking strategy

CHANGES:
- Removed MagicMock/Path.cwd().__truediv__()/ directory tree
- Updated 6 test methods to use proper service-level mocking
- Replaced problematic patch('markitect.cli.Path') patterns
- Added specific patch('markitect.cache_service.CacheDirectoryService.get_cache_stats')

VALIDATION:
- All 307 tests pass
- No new MagicMock directories created during test runs
- Zero risk, high impact infrastructure cleanup

Implements: MAIN_BRANCH_OPTIMIZATION_GAMEPLAN.md Phase 1.1

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 18:00:50 +02:00

8.6 KiB