Move test for #309 to regression tests

This commit is contained in:
Ines Montani 2017-01-11 23:52:13 +01:00
parent d0e37b5670
commit c9671329dc
2 changed files with 14 additions and 9 deletions

View File

@ -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

View 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