spaCy/tests/vocab/test_iter_lexicon.py

20 lines
252 B
Python
Raw Normal View History

import pytest
2014-12-21 10:01:46 +00:00
from spacy.en import English
2015-04-19 19:39:18 +00:00
2014-12-21 10:01:46 +00:00
@pytest.fixture
def EN():
2014-12-30 10:34:09 +00:00
return English()
2015-04-19 19:39:18 +00:00
2014-12-21 10:01:46 +00:00
def test_range_iter(EN):
for i in range(len(EN.vocab)):
lex = EN.vocab[i]
2014-12-21 10:01:46 +00:00
def test_iter(EN):
i = 0
2014-12-21 10:01:46 +00:00
for lex in EN.vocab:
i += 1