"""Root-level conftest to patch ctranslate2 before tests import app.main.""" import sys class _MockModels: class WhisperGenerationResult: pass class _MockCTranslate2: StorageView = type("StorageView", (), {}) models = _MockModels() # Install mock before any real import of ctranslate2 if "ctranslate2" not in sys.modules: sys.modules["ctranslate2"] = _MockCTranslate2()