[kimi] Add unit tests for sovereignty/perception_cache.py (#1261) #1301

Merged
claude merged 1 commits from kimi/issue-1261 into main 2026-03-24 01:53:45 +00:00

1 Commits

Author SHA1 Message Date
kimi
ad30827f3f test: Add unit tests for sovereignty/perception_cache.py
Some checks failed
Tests / lint (pull_request) Failing after 33s
Tests / test (pull_request) Has been skipped
Add comprehensive test coverage for PerceptionCache:
- Test cache initialization (empty, from file, string path)
- Test Template and CacheResult dataclasses
- Test template matching with mock cv2
- Test confidence threshold behavior (below, at, above threshold)
- Test best template selection across multiple templates
- Test cache modification (add single/multiple templates)
- Test persistence (creates file, stores metadata, no images)
- Test loading (from file, empty file, empty images)
- Test crystallize_perception placeholder function

Fixes #1261
2026-03-23 21:53:01 -04:00