fix(tests): mock spacy in plugin tests to fix externally-managed-environment failures

This commit is contained in:
Artem Akymenko
2026-07-16 10:02:01 +03:00
parent 1268a83cff
commit ef07a8b5b2
2 changed files with 21 additions and 1 deletions
+3 -1
View File
@@ -38,8 +38,10 @@ from tests.contracts.engine_contract import EngineContractMixin
def _kokoro_available() -> bool:
try:
from kokoro import KPipeline # type: ignore[import-not-found]
import spacy
spacy.load("en_core_web_sm")
return True
except ImportError:
except (ImportError, OSError):
return False