* Add test to make sure iterating over the lexicon isnt broken

This commit is contained in:
Matthew Honnibal 2014-12-08 21:12:51 +11:00
parent 99bbbb6feb
commit cda9ea9a4a

View 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