spaCy/tests/website/conftest.py

16 lines
347 B
Python
Raw Normal View History

2015-09-28 15:22:13 +03:00
from __future__ import unicode_literals
import pytest
import os
2015-09-28 15:22:13 +03:00
@pytest.fixture(scope='session')
def nlp():
from spacy.en import English, LOCAL_DATA_DIR
data_dir = os.environ.get('SPACY_DATA', LOCAL_DATA_DIR)
return English(data_dir=data_dir)
2015-09-28 15:22:13 +03:00
@pytest.fixture()
def doc(nlp):
return nlp('Hello, world. Here are two sentences.')