mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 21:50:28 +02:00
fix(tests): mock spacy in plugin tests to fix externally-managed-environment failures
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user