mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
* Upd tests
This commit is contained in:
parent
c1ef3febee
commit
81d878beb2
|
@ -4,7 +4,7 @@ import pytest
|
|||
|
||||
@pytest.fixture
|
||||
def EN():
|
||||
return English(tag=True, parse=False)
|
||||
return English()
|
||||
|
||||
@pytest.fixture
|
||||
def tagged(EN):
|
||||
|
|
|
@ -5,7 +5,7 @@ from spacy.en import English
|
|||
|
||||
@pytest.fixture
|
||||
def EN():
|
||||
return English(tag=False)
|
||||
return English()
|
||||
|
||||
|
||||
def test_possess(EN):
|
||||
|
|
|
@ -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 =| ") :> ...."""
|
||||
|
|
|
@ -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)):
|
||||
|
|
|
@ -8,7 +8,7 @@ from spacy.en.attrs import *
|
|||
|
||||
@pytest.fixture
|
||||
def EN():
|
||||
return English(tag=False)
|
||||
return English()
|
||||
|
||||
|
||||
def test_is_alpha(EN):
|
||||
|
|
|
@ -8,7 +8,7 @@ from spacy.en import English
|
|||
|
||||
@pytest.fixture
|
||||
def EN():
|
||||
return English(tag=True, parse=False)
|
||||
return English()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -7,7 +7,7 @@ import pytest
|
|||
|
||||
@pytest.fixture
|
||||
def EN():
|
||||
return English(tag=False)
|
||||
return English()
|
||||
|
||||
|
||||
def test_single_space(EN):
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user