mirror of https://github.com/explosion/spaCy.git
Ensure words are added to vocab before test, so that the lexicon is updated correctly.
This commit is contained in:
parent
75529a9f3b
commit
788657f062
|
@ -10,9 +10,11 @@ def nlp():
|
|||
data_dir = os.environ.get('SPACY_DATA')
|
||||
else:
|
||||
data_dir = None
|
||||
return English(data_dir=data_dir)
|
||||
return English(path=data_dir)
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def doc(nlp):
|
||||
for word in ['Hello', ',', 'world', '.', 'Here', 'are', 'two', 'sentences', '.']:
|
||||
_ = nlp.vocab[word]
|
||||
return nlp('Hello, world. Here are two sentences.')
|
||||
|
|
Loading…
Reference in New Issue