* Load the lexicon before we check flag values

This commit is contained in:
Matthew Honnibal 2014-12-09 15:18:43 +11:00
parent 302e09018b
commit 2a6bd2818f
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,7 @@ from spacy.lexeme import *
def test_is_alpha():
EN.load()
the = EN.lexicon['the']
assert the['flags'] & (1 << IS_ALPHA)
year = EN.lexicon['1999']
@ -16,6 +17,7 @@ def test_is_alpha():
def test_is_digit():
EN.load()
the = EN.lexicon['the']
assert not the['flags'] & (1 << IS_DIGIT)
year = EN.lexicon['1999']