gwoe-antragspruefer/tests/integration
Dotty Dotter 73a7f76472 Add E2E functional acceptance test suite (#50, #51, #52, #53, #54)
Vier Sub-Issues unter Umbrella #50 — opt-in via 'pytest -m integration',
Default-Suite (77 Unit-Tests) bleibt unberührt.

- Sub-Issue A (#51): test_adapters_live.py — pro aktivem BL Reachability,
  Drucksache-ID-Format, Type-Filter, Datum-/Fraktion-Plausibilität,
  PDF-Link-HEAD-Probe (slow). NI als xfail (Login-Wall).
- Sub-Issue B (#52): test_frontend_xref.py + ground_truth.py — pro BL
  ein manuell kuratiertes Frontend-Sample (Drucksache + Title-Substring +
  Fraktionen + Datum + PDF-URL), gegen das adapter.get_document() gespiegelt
  wird. Fängt Bug-Klasse 14 (Cross-Bundesland-Match).
- Sub-Issue C (#53): test_wahlprogramme_indexed.py — Indexing-Status pro
  aktivem BL aus embeddings.db, PDF-Inhalts-Plausibilität (14 Marker +
  Wahlperioden-Horizont), expliziter Anti-Marker für Bug-Klasse 8
  (CDU-BE 2021 vs 2026 PDF-Tausch durch abgeordnetenwatch).
- Sub-Issue D (#54): test_citations_substring.py — Property-Verification:
  jedes vom LLM zitierte Snippet muss als (whitespace-normalisierter)
  Substring auf der angegebenen PDF-Seite vorhanden sein. Strict-Match
  mit Truncation-Marker-Toleranz, kein Fuzzy. Liest reale Assessments
  aus gwoe-antraege.db. Fängt Bug-Klassen 7/10/17 (Halluzination).

Architektur: separates tests/integration/ Verzeichnis mit eigenem
conftest.py, das die Stubs der Unit-Suite (fitz/bs4/openai/pydantic_settings)
gezielt entfernt und auf echte Module umstellt — mit Fallback-Skip via
pytest.require_module wenn lokale Dev-Maschine die Prod-Deps nicht hat.

206 neue Integration-Tests, 13 Helper-Unit-Tests. 77 Unit-Tests bleiben grün.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 10:00:20 +02:00
..
__init__.py Add E2E functional acceptance test suite (#50, #51, #52, #53, #54) 2026-04-09 10:00:20 +02:00
conftest.py Add E2E functional acceptance test suite (#50, #51, #52, #53, #54) 2026-04-09 10:00:20 +02:00
ground_truth.py Add E2E functional acceptance test suite (#50, #51, #52, #53, #54) 2026-04-09 10:00:20 +02:00
test_adapters_live.py Add E2E functional acceptance test suite (#50, #51, #52, #53, #54) 2026-04-09 10:00:20 +02:00
test_citations_substring.py Add E2E functional acceptance test suite (#50, #51, #52, #53, #54) 2026-04-09 10:00:20 +02:00
test_frontend_xref.py Add E2E functional acceptance test suite (#50, #51, #52, #53, #54) 2026-04-09 10:00:20 +02:00
test_wahlprogramme_indexed.py Add E2E functional acceptance test suite (#50, #51, #52, #53, #54) 2026-04-09 10:00:20 +02:00