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