test: tidy embedding follow-up imports
Agent-Logs-Url: https://github.com/MemPalace/mempalace/sessions/3213a67a-6871-4bb2-9ae0-23fa11001a22 Co-authored-by: igorls <4753812+igorls@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
9fbdba17ca
commit
3d529e7028
@@ -1,5 +1,7 @@
|
||||
"""Unit tests for convo_miner pure functions (no chromadb needed)."""
|
||||
|
||||
import contextlib
|
||||
|
||||
from mempalace.convo_miner import (
|
||||
_file_chunks_locked,
|
||||
chunk_exchanges,
|
||||
@@ -116,8 +118,6 @@ class TestScanConvos:
|
||||
|
||||
class TestFileChunksLocked:
|
||||
def test_uses_bounded_upsert_batches(self, monkeypatch):
|
||||
import contextlib
|
||||
|
||||
import mempalace.convo_miner as convo_miner
|
||||
|
||||
class FakeCol:
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import builtins
|
||||
|
||||
import pytest
|
||||
|
||||
import mempalace.embedding as embedding
|
||||
@@ -62,6 +60,8 @@ def test_unknown_device_warns_once(monkeypatch, caplog):
|
||||
|
||||
|
||||
def test_onnxruntime_import_error_falls_back_to_cpu(monkeypatch):
|
||||
import builtins
|
||||
|
||||
real_import = builtins.__import__
|
||||
|
||||
def fake_import(name, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user