* 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
def EN():
return English(tag=True, parse=False)
return English()
@pytest.fixture
def tagged(EN):

View File

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

View File

@ -6,7 +6,7 @@ from spacy.en import English
@pytest.fixture
def EN():
return English(tag=False)
return English()
def test_tweebo_challenge(EN):
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
def EN():
return English(tag=True)
return English()
def test_range_iter(EN):
for i in range(len(EN.vocab)):

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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