mirror of https://github.com/explosion/spaCy.git
30 lines
542 B
Python
30 lines
542 B
Python
from __future__ import unicode_literals
|
|
import pytest
|
|
|
|
from spacy.en import English
|
|
|
|
|
|
@pytest.fixture
|
|
def EN():
|
|
return English()
|
|
|
|
|
|
def test_neq(EN):
|
|
addr = EN.vocab['Hello']
|
|
assert EN.vocab['bye']['sic'] != addr['sic']
|
|
|
|
|
|
def test_eq(EN):
|
|
addr = EN.vocab['Hello']
|
|
assert EN.vocab['Hello']['sic'] == addr['sic']
|
|
|
|
|
|
def test_case_neq(EN):
|
|
addr = EN.vocab['Hello']
|
|
assert EN.vocab['hello']['sic'] != addr['sic']
|
|
|
|
|
|
def test_punct_neq(EN):
|
|
addr = EN.vocab['Hello']
|
|
assert EN.vocab['Hello,']['sic'] != addr['sic']
|