Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

test(pdf-storage): restore _COERCION_WARNED through monkeypatch (#7545)

Masyarakat AI Indonesia - FMD1ee3726bd8d7
diff --git a/tests/research_library/services/test_pdf_storage_gate.py b/tests/research_library/services/test_pdf_storage_gate.py
index 2f8b11cad4..4942c73afb 100644
--- a/tests/research_library/services/test_pdf_storage_gate.py
+++ b/tests/research_library/services/test_pdf_storage_gate.py
@@ -55,12 +55,15 @@ class TestFilesystemPdfStorageGate:
):
assert resolve_pdf_storage_mode(value) == "database"
- def test_resolve_coercion_warns_once(self, gate_off, loguru_caplog):
+ def test_resolve_coercion_warns_once(
+ self, gate_off, loguru_caplog, monkeypatch
+ ):
from local_deep_research.research_library.services import (
pdf_storage_manager,
)
- pdf_storage_manager._COERCION_WARNED = False
+ # monkeypatch restores the module global for whatever runs next.
+ monkeypatch.setattr(pdf_storage_manager, "_COERCION_WARNED", False)
with loguru_caplog.at_level("WARNING"):
assert resolve_pdf_storage_mode("filesystem") == "database"
assert resolve_pdf_storage_mode("filesystem") == "database"