Files
kwcode/tests/vision
dashitongzhi d835d9b640 test: add unit tests for vision expert routing and config
- _should_execute_code: compound phrase matching (10 tests)
- _is_codegen_task: verb+target combos (10 tests)
- _vision_api_configured: requires URL AND MODEL (5 tests)
- temp directory lifecycle and cleanup (4 tests)
- media-type detection via magic bytes and base64 (12 tests)
- _validate_image edge cases (4 tests)
- run routing: no image / too many images (2 tests)
- LLM fallback to Anthropic API (2 tests)
- _media_type_for_path fallback chain (3 tests)
- init, validate_image_path, get_image_info (6 tests)

Total: 59 test cases, all passing.
2026-05-01 22:45:35 +08:00
..