Affected Component
Other / Not sure
Bug Description
The test test_memory_import_does_not_require_cv2 verifies that importing the memory service does not eagerly import the OpenCV-dependent tracker. However, when run in a full test runner session, other test files execute first and import cv2, caching it in sys.modules. As a result, the subsequent assertion checking that cv2 is absent fails.
Steps to Reproduce
Run the tracker and memory tests in a single command:
python -m pytest tests/test_tracker.py tests/test_memory.py -k test_memory_import_does_not_require_cv2 -v
### Expected Behavior
`test_memory_import_does_not_require_cv2` should successfully assert that importing memory doesn't trigger an eager import of `cv2`, even if `cv2` was imported in a prior test runner context.
### Actual Behavior
When the full test suite runs, `cv2` is eagerly imported by earlier tests (e.g., in `test_tracker.py`), causing the subsequent import test in `test_memory.py` to fail with:
AssertionError: assert 'cv2' not in sys.modules
### Python Version
3.11
### Operating System
Windows 11
### Inference Device
None
### Error Log / Traceback
```shell
Screenshots or Recordings
No response
Additional Context
No response
Checklist
Affected Component
Other / Not sure
Bug Description
The test
test_memory_import_does_not_require_cv2verifies that importing the memory service does not eagerly import the OpenCV-dependent tracker. However, when run in a full test runner session, other test files execute first and importcv2, caching it insys.modules. As a result, the subsequent assertion checking thatcv2is absent fails.Steps to Reproduce
Run the tracker and memory tests in a single command:
Screenshots or Recordings
No response
Additional Context
No response
Checklist
mainbranch.