[kimi] Fix: stub cv2 in tests to prevent timeout (#1336) #1356
Reference in New Issue
Block a user
Delete Branch "kimi/issue-1336"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1336
Problem
test_cache_hit_skips_vlmtimes out consistently on main (43s > 30s limit) when running with pytest-xdist parallel workers.Root Cause
perception_cache.pyimportscv2(OpenCV) at the module level. When tests run in parallel with pytest-xdist, the cv2 import can hang/deadlock, causing the 30-second timeout.Fix
Add
cv2to the list of stubbed modules intests/conftest.py. This ensures tests get a MagicMock instead of the real cv2, avoiding the import hang.Verification
tests/conftest.pypasses ruff lintChanges
tests/conftest.py: Added"cv2"to the stubbed modules list