From f95da0bd52cee922db7546e5a6c531aae22f71ba Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 9 Jul 2015 12:18:02 +0200 Subject: [PATCH] * Allow tests to read model dir from SPACY_DATA environment variable --- tests/conftest.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 91b9097cc..43a275cd6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,7 +1,9 @@ import pytest -from spacy.en import English +from spacy.en import English, LOCAL_DATA_DIR +import os @pytest.fixture(scope="session") def EN(): - return English() + data_dir = os.environ.get('SPACY_DATA', LOCAL_DATA_DIR) + return English(data_dir=data_dir)