-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Some regression tests fail (locally) on current master #2379
Copy link
Copy link
Closed
Labels
help wantedContributions welcome!Contributions welcome!testsNew, missing or incorrect testsNew, missing or incorrect tests
Description
How to reproduce the behaviour
Here's what I did:
git clone https://github.com/explosion/spaCy.git explosion.spaCy
mkvirtualenv -p /usr/local/opt/python3/bin/python3 spaCyTmp
cd explosion.spaCy/
pip install -r requirements.txt
python setup.py build_ext --inplace
python -m spacy download en_core_web_md
python -m spacy download en_core_web_sm
python -m spacy download fr_core_news_sm
python -m spacy download es_core_news_sm
python -m spacy download es_core_news_md
python -m spacy download en
python -m spacy download de
python -m spacy download fr
python -m spacy download es
py.test spacy --models --all --slow
This results in some test failures:
====================================================================================================================== FAILURES ======================================================================================================================
________________________________________________________________________________________________ test_issue401[en_core_web_sm-Jane's got a new car-1] ________________________________________________________________________________________________
EN = <spacy.lang.en.English object at 0x11da6b518>, text = "Jane's got a new car", i = 1
@pytest.mark.models('en')
@pytest.mark.parametrize('text,i', [("Jane's got a new car", 1),
("Jane thinks that's a nice car", 3)])
def test_issue401(EN, text, i):
"""Text that 's in contractions is not lemmatized as '."""
tokens = EN(text)
> assert tokens[i].lemma_ != "'"
E AttributeError: 'str' object has no attribute 'lemma_'
spacy/tests/regression/test_issue401.py:13: AttributeError
___________________________________________________________________________________________ test_issue401[en_core_web_sm-Jane thinks that's a nice car-3] ____________________________________________________________________________________________
EN = <spacy.lang.en.English object at 0x11da6b518>, text = "Jane thinks that's a nice car", i = 3
@pytest.mark.models('en')
@pytest.mark.parametrize('text,i', [("Jane's got a new car", 1),
("Jane thinks that's a nice car", 3)])
def test_issue401(EN, text, i):
"""Text that 's in contractions is not lemmatized as '."""
tokens = EN(text)
> assert tokens[i].lemma_ != "'"
E AttributeError: 'str' object has no attribute 'lemma_'
spacy/tests/regression/test_issue401.py:13: AttributeError
____________________________________________________________________________________________________ test_issue686[en_core_web_sm-He is the man] _____________________________________________________________________________________________________
EN = <spacy.lang.en.English object at 0x11da6b518>, text = 'He is the man'
@pytest.mark.models('en')
@pytest.mark.parametrize('text', ["He is the man", "he is the man"])
def test_issue686(EN, text):
"""Test that pronoun lemmas are assigned correctly."""
tokens = EN(text)
> assert tokens[0].lemma_ == "-PRON-"
E AttributeError: 'str' object has no attribute 'lemma_'
spacy/tests/regression/test_issue686.py:12: AttributeError
____________________________________________________________________________________________________ test_issue686[en_core_web_sm-he is the man] _____________________________________________________________________________________________________
EN = <spacy.lang.en.English object at 0x11da6b518>, text = 'he is the man'
@pytest.mark.models('en')
@pytest.mark.parametrize('text', ["He is the man", "he is the man"])
def test_issue686(EN, text):
"""Test that pronoun lemmas are assigned correctly."""
tokens = EN(text)
> assert tokens[0].lemma_ == "-PRON-"
E AttributeError: 'str' object has no attribute 'lemma_'
spacy/tests/regression/test_issue686.py:12: AttributeError
______________________________________________________________________________________________ test_issue717[en_core_web_sm-You're happy-You are happy] ______________________________________________________________________________________________
EN = <spacy.lang.en.English object at 0x11da6b518>, text1 = "You're happy", text2 = 'You are happy'
@pytest.mark.models('en')
@pytest.mark.parametrize('text1,text2',
[("You're happy", "You are happy"),
("I'm happy", "I am happy"),
("he's happy", "he's happy")])
def test_issue717(EN, text1, text2):
"""Test that contractions are assigned the correct lemma."""
doc1 = EN(text1)
doc2 = EN(text2)
> assert doc1[1].lemma_ == doc2[1].lemma_
E AttributeError: 'str' object has no attribute 'lemma_'
spacy/tests/regression/test_issue717.py:16: AttributeError
_________________________________________________________________________________________________ test_issue717[en_core_web_sm-I'm happy-I am happy] _________________________________________________________________________________________________
EN = <spacy.lang.en.English object at 0x11da6b518>, text1 = "I'm happy", text2 = 'I am happy'
@pytest.mark.models('en')
@pytest.mark.parametrize('text1,text2',
[("You're happy", "You are happy"),
("I'm happy", "I am happy"),
("he's happy", "he's happy")])
def test_issue717(EN, text1, text2):
"""Test that contractions are assigned the correct lemma."""
doc1 = EN(text1)
doc2 = EN(text2)
> assert doc1[1].lemma_ == doc2[1].lemma_
E AttributeError: 'str' object has no attribute 'lemma_'
spacy/tests/regression/test_issue717.py:16: AttributeError
________________________________________________________________________________________________ test_issue717[en_core_web_sm-he's happy-he's happy] _________________________________________________________________________________________________
EN = <spacy.lang.en.English object at 0x11da6b518>, text1 = "he's happy", text2 = "he's happy"
@pytest.mark.models('en')
@pytest.mark.parametrize('text1,text2',
[("You're happy", "You are happy"),
("I'm happy", "I am happy"),
("he's happy", "he's happy")])
def test_issue717(EN, text1, text2):
"""Test that contractions are assigned the correct lemma."""
doc1 = EN(text1)
doc2 = EN(text2)
> assert doc1[1].lemma_ == doc2[1].lemma_
E AttributeError: 'str' object has no attribute 'lemma_'
spacy/tests/regression/test_issue717.py:16: AttributeError
_________________________________________________________________________________________________________ test_issue719[en_core_web_sm-s...] _________________________________________________________________________________________________________
EN = <spacy.lang.en.English object at 0x11da6b518>, text = 's...'
@pytest.mark.models('en')
@pytest.mark.parametrize('text', ["s..."])
def test_issue719(EN, text):
"""Test that the token 's' is not lemmatized into empty string."""
tokens = EN(text)
> assert tokens[0].lemma_ != ''
E IndexError: string index out of range
spacy/tests/regression/test_issue719.py:12: IndexError
___________________________________________________________________________________________________________ test_issue955[en_core_web_sm] ____________________________________________________________________________________________________________
EN = <spacy.lang.en.English object at 0x11da6b518>
@pytest.mark.models('en')
def test_issue955(EN):
'''Test that we don't have any nested noun chunks'''
doc = EN('Does flight number three fifty-four require a connecting flight'
' to get to Boston?')
seen_tokens = set()
> for np in doc.noun_chunks:
E AttributeError: 'str' object has no attribute 'noun_chunks'
spacy/tests/regression/test_issue995.py:12: AttributeError
==================================================================================== 9 failed, 1408 passed, 132 skipped, 46 xfailed, 10 xpassed in 298.42 seconds ====================================================================================
Info about spaCy
- Python version: 3.5.1
- spaCy version: 2.0.12.dev0
- Models: de, en, en_core_web_md, en_core_web_sm, es, es_core_news_md, es_core_news_sm, fr, fr_core_news_sm
- Platform: Darwin-16.7.0-x86_64-i386-64bit
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedContributions welcome!Contributions welcome!testsNew, missing or incorrect testsNew, missing or incorrect tests