mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
* Add test to make sure iterating over the lexicon isnt broken
This commit is contained in:
parent
99bbbb6feb
commit
cda9ea9a4a
15
tests/test_iter_lexicon.py
Normal file
15
tests/test_iter_lexicon.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
import pytest
|
||||
|
||||
from spacy.en import EN
|
||||
|
||||
def test_range_iter():
|
||||
EN.load()
|
||||
for i in range(len(EN.lexicon)):
|
||||
lex = EN.lexicon[i]
|
||||
|
||||
|
||||
def test_iter():
|
||||
EN.load()
|
||||
i = 0
|
||||
for lex in EN.lexicon:
|
||||
i += 1
|
Loading…
Reference in New Issue
Block a user