* Allow tests to read model dir from SPACY_DATA environment variable

This commit is contained in:
Matthew Honnibal 2015-07-09 12:18:02 +02:00
parent 55f1042443
commit f95da0bd52
1 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,9 @@
import pytest import pytest
from spacy.en import English from spacy.en import English, LOCAL_DATA_DIR
import os
@pytest.fixture(scope="session") @pytest.fixture(scope="session")
def EN(): def EN():
return English() data_dir = os.environ.get('SPACY_DATA', LOCAL_DATA_DIR)
return English(data_dir=data_dir)