* Add test for Issue #309

This commit is contained in:
Matthew Honnibal 2016-05-04 16:00:28 +02:00
parent 76f1d871da
commit 72564213e3
1 changed files with 10 additions and 0 deletions

View File

@ -100,6 +100,16 @@ def test_sbd_serialization_projective(EN):
assert [s.text for s in example.sents] == [s.text for s in example_serialized.sents] 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: # TODO:
# @pytest.mark.models # @pytest.mark.models
# def test_sbd_serialization_nonprojective(DE): # def test_sbd_serialization_nonprojective(DE):