mirror of https://github.com/explosion/spaCy.git
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
|
||||
|
|
|
@ -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