* Upd tests

This commit is contained in:
Matthew Honnibal 2014-12-30 21:34:09 +11:00
parent c1ef3febee
commit 81d878beb2
11 changed files with 12 additions and 12 deletions

View File

@ -4,7 +4,7 @@ import pytest
@pytest.fixture @pytest.fixture
def EN(): def EN():
return English(tag=True, parse=False) return English()
@pytest.fixture @pytest.fixture
def tagged(EN): def tagged(EN):

View File

@ -5,7 +5,7 @@ from spacy.en import English
@pytest.fixture @pytest.fixture
def EN(): def EN():
return English(tag=False) return English()
def test_possess(EN): def test_possess(EN):

View File

@ -6,7 +6,7 @@ from spacy.en import English
@pytest.fixture @pytest.fixture
def EN(): def EN():
return English(tag=False) return English()
def test_tweebo_challenge(EN): def test_tweebo_challenge(EN):
text = u""":o :/ :'( >:o (: :) >.< XD -__- o.O ;D :-) @_@ :P 8D :1 >:( :D =| ") :> ....""" text = u""":o :/ :'( >:o (: :) >.< XD -__- o.O ;D :-) @_@ :P 8D :1 >:( :D =| ") :> ...."""

View File

@ -4,7 +4,7 @@ from spacy.en import English
@pytest.fixture @pytest.fixture
def EN(): def EN():
return English(tag=True) return English()
def test_range_iter(EN): def test_range_iter(EN):
for i in range(len(EN.vocab)): for i in range(len(EN.vocab)):

View File

@ -8,7 +8,7 @@ from spacy.en.attrs import *
@pytest.fixture @pytest.fixture
def EN(): def EN():
return English(tag=False) return English()
def test_is_alpha(EN): def test_is_alpha(EN):

View File

@ -8,7 +8,7 @@ from spacy.en import English
@pytest.fixture @pytest.fixture
def EN(): def EN():
return English(tag=True, parse=False) return English()
@pytest.fixture @pytest.fixture

View File

@ -4,10 +4,10 @@ import pytest
from spacy.en import English from spacy.en import English
def test_only_pre1(): def test_only_pre1():
EN = English(tag=False, parse=False) EN = English()
assert len(EN("(")) == 1 assert len(EN("(")) == 1
def test_only_pre2(): def test_only_pre2():
EN = English(tag=False, parse=False) EN = English()
assert len(EN("((")) == 2 assert len(EN("((")) == 2

View File

@ -12,7 +12,7 @@ def open_puncts():
@pytest.fixture @pytest.fixture
def EN(): def EN():
return English(tag=False, parse=False) return English()
def test_open(open_puncts, EN): def test_open(open_puncts, EN):

View File

@ -8,7 +8,7 @@ from spacy.en import English
@pytest.fixture @pytest.fixture
def EN(): def EN():
return English(tag=False, parse=False) return English()
def test_single_word(EN): def test_single_word(EN):
tokens = EN(u'hello') tokens = EN(u'hello')

View File

@ -7,7 +7,7 @@ import pytest
@pytest.fixture @pytest.fixture
def EN(): def EN():
return English(tag=False) return English()
def test_single_space(EN): def test_single_space(EN):

View File

@ -18,7 +18,7 @@ def sun_txt():
def test_tokenize(sun_txt): def test_tokenize(sun_txt):
nlp = English(tag=False, parse=False) nlp = English()
assert len(sun_txt) != 0 assert len(sun_txt) != 0
tokens = nlp(sun_txt) tokens = nlp(sun_txt)
assert True assert True