mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
Move test for #309 to regression tests
This commit is contained in:
parent
d0e37b5670
commit
c9671329dc
|
@ -100,15 +100,6 @@ def test_sbd_serialization_projective(EN):
|
|||
assert [s.text for s in example.sents] == [s.text for s in example_serialized.sents]
|
||||
|
||||
|
||||
def test_sbd_empty_string(EN):
|
||||
'''Test Issue #309: SBD fails on empty string
|
||||
'''
|
||||
doc = EN(u' ')
|
||||
doc.is_parsed = True
|
||||
assert len(doc) == 1
|
||||
sents = list(doc.sents)
|
||||
assert len(sents) == 1
|
||||
|
||||
|
||||
# TODO:
|
||||
# @pytest.mark.models
|
||||
|
|
14
spacy/tests/regression/test_issue309.py
Normal file
14
spacy/tests/regression/test_issue309.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from ..util import get_doc
|
||||
|
||||
|
||||
def test_sbd_empty_string(en_tokenizer):
|
||||
"""Test Issue #309: SBD fails on empty string"""
|
||||
tokens = en_tokenizer(" ")
|
||||
doc = get_doc(tokens.vocab, [t.text for t in tokens], heads=[0], deps=['ROOT'])
|
||||
doc.is_parsed = True
|
||||
assert len(doc) == 1
|
||||
sents = list(doc.sents)
|
||||
assert len(sents) == 1
|
Loading…
Reference in New Issue
Block a user