refactor(evidence): migrate runtime consumption (#29)
This commit is contained in:
@@ -93,6 +93,18 @@ def _patch(monkeypatch, embedder, searcher):
|
||||
|
||||
|
||||
def test_pack_single_embed_and_sections(tmp_path, monkeypatch):
|
||||
import tht.evidence as evidence_facade
|
||||
|
||||
projected = []
|
||||
build_retrieval_entries = evidence_facade.build_retrieval_entries
|
||||
monkeypatch.setattr(
|
||||
evidence_facade,
|
||||
"build_retrieval_entries",
|
||||
lambda results, *, excerpt_chars: (
|
||||
projected.append((list(results), excerpt_chars))
|
||||
or build_retrieval_entries(results, excerpt_chars=excerpt_chars)
|
||||
),
|
||||
)
|
||||
cfg = _workspace(tmp_path)
|
||||
emb = _FakeEmbedder()
|
||||
searcher = _FakeSearcher()
|
||||
@@ -109,6 +121,7 @@ def test_pack_single_embed_and_sections(tmp_path, monkeypatch):
|
||||
# must not leak into a new search pack.
|
||||
assert "Dominio ablazione" not in res.output
|
||||
assert "SELECT 1" in res.output
|
||||
assert projected == [([], 400)]
|
||||
|
||||
|
||||
def test_pack_json_and_session_file(tmp_path, monkeypatch):
|
||||
|
||||
Reference in New Issue
Block a user