test(e2e): decompose monolithic test suite and fortify semantic guards

This commit is contained in:
2026-04-28 23:09:04 +02:00
parent e94dfe8c5c
commit dc4b576bc1
19 changed files with 458 additions and 306 deletions

View File

@@ -135,17 +135,15 @@ def iteration_guard():
@pytest.fixture(scope="function", autouse=True)
def isolated_screen_memory():
def isolated_screen_memory(monkeypatch):
"""Ensures we use a separate Qdrant collection for E2E tests and clean it.
This replaces the old Qdrant mock so tests use the REAL database."""
from GramAddict.core.qdrant_memory import ScreenMemoryDB
original_init = ScreenMemoryDB.__init__
def test_init(self, *args, **kwargs):
super(ScreenMemoryDB, self).__init__(collection_name="test_e2e_screens")
ScreenMemoryDB.__init__ = test_init
monkeypatch.setattr(ScreenMemoryDB, "__init__", test_init)
db = ScreenMemoryDB()
if db.is_connected:
@@ -153,9 +151,6 @@ def isolated_screen_memory():
yield db
# Restore original
ScreenMemoryDB.__init__ = original_init
# ═══════════════════════════════════════════════════════
# Device Dump Injectors