pagepiper/tests
pyr0ball 1327d2b0a6 fix: clean up CF_ORCH_URL/GPU_SERVER_URL env leak in test_config.py
Found during freeze-branch integration testing (PR #12 + #14 + #15
combined): app/config.py's write-back (os.environ["CF_ORCH_URL"] =
GPU_SERVER_URL) is a module-level side effect monkeypatch never tracks,
so it wasn't being reverted between tests. Once any test_config.py test
set a truthy GPU_SERVER_URL/CF_LICENSE_KEY, the resulting CF_ORCH_URL
wrote leaked into every later test in the same pytest session.

This silently broke all five "skips_embeddings_without_ollama_url"
tests across the shelve_*.py suite (pdf, docx, odt, ods, xlsx) — their
get_llm_config() check no longer saw a clean "nothing configured" state,
so they attempted embedding instead of skipping it. Neither PR #12 nor
#14 alone exercised this combination in the same test session, so it
only surfaced once merged together.

Fix: explicitly pop CF_ORCH_URL/GPU_SERVER_URL/CF_LICENSE_KEY from
os.environ in the autouse teardown fixture before reloading app.config,
rather than relying on monkeypatch to catch a write it never made itself.
2026-07-10 19:24:39 -07:00
..
__init__.py feat: add database schema and migration runner 2026-05-04 17:10:38 -07:00
conftest.py feat: replace nomic-embed-text retriever with Agent-ModernColBERT 2026-07-10 19:02:12 -07:00
test_bm25_index.py fix(services): add SQLite error handling and strengthen top_k test 2026-05-04 17:20:26 -07:00
test_chat_api.py feat(api): add retriever, synthesizer, and chat endpoint (BSL — BYOK gate) 2026-05-04 17:47:10 -07:00
test_colbert_index.py feat: replace nomic-embed-text retriever with Agent-ModernColBERT 2026-07-10 19:02:12 -07:00
test_config.py fix: clean up CF_ORCH_URL/GPU_SERVER_URL env leak in test_config.py 2026-07-10 19:24:39 -07:00
test_db_migrate.py fix(config): handle /v1 suffix in PAGEPIPER_OLLAMA_URL; add DATA_DIR mkdir guard 2026-05-04 17:13:50 -07:00
test_library_api.py feat: add ODT and Apple Pages document support, wire DOCX into UI 2026-07-10 13:58:43 -07:00
test_retriever.py feat: replace nomic-embed-text retriever with Agent-ModernColBERT 2026-07-10 19:02:12 -07:00
test_search_api.py feat: per-user database isolation for cloud instances (closes #4) 2026-05-13 16:31:51 -07:00
test_shelve.py feat: add ODT and Apple Pages document support, wire DOCX into UI 2026-07-10 13:58:43 -07:00
test_shelve_docx.py feat: add ODT and Apple Pages document support, wire DOCX into UI 2026-07-10 13:58:43 -07:00
test_shelve_numbers.py feat: add XLSX, ODS, and Apple Numbers spreadsheet support 2026-07-10 15:06:16 -07:00
test_shelve_ods.py feat: add XLSX, ODS, and Apple Numbers spreadsheet support 2026-07-10 15:06:16 -07:00
test_shelve_odt.py feat: add ODT and Apple Pages document support, wire DOCX into UI 2026-07-10 13:58:43 -07:00
test_shelve_pages.py feat: add ODT and Apple Pages document support, wire DOCX into UI 2026-07-10 13:58:43 -07:00
test_shelve_xlsx.py feat: add XLSX, ODS, and Apple Numbers spreadsheet support 2026-07-10 15:06:16 -07:00
test_startup.py feat: per-user database isolation for cloud instances (closes #4) 2026-05-13 16:31:51 -07:00
test_synthesizer.py fix: T7 quality — SynthesisResult.citations tuple, retriever comments, test assertion 2026-05-04 17:51:22 -07:00
test_text_clean.py feat: RAG retrieval quality, artifact cleaning, and ingestion progress UI 2026-05-06 08:25:58 -07:00