refactor(ocr): rename _contains to contains in SenderModelRegistry
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -72,7 +72,7 @@ class _SenderModelRegistry:
|
|||||||
with self._lock:
|
with self._lock:
|
||||||
return len(self._cache)
|
return len(self._cache)
|
||||||
|
|
||||||
def _contains(self, model_path: str) -> bool:
|
def contains(self, model_path: str) -> bool:
|
||||||
with self._lock:
|
with self._lock:
|
||||||
return model_path in self._cache
|
return model_path in self._cache
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ def test_lru_eviction_removes_least_recently_used():
|
|||||||
|
|
||||||
assert registry.size() == 2
|
assert registry.size() == 2
|
||||||
# 'a' was the least-recently-used and should be gone
|
# 'a' was the least-recently-used and should be gone
|
||||||
assert not registry._contains("/app/models/sender_a.mlmodel")
|
assert not registry.contains("/app/models/sender_a.mlmodel")
|
||||||
|
|
||||||
|
|
||||||
def test_invalidate_removes_entry_from_cache():
|
def test_invalidate_removes_entry_from_cache():
|
||||||
|
|||||||
Reference in New Issue
Block a user