diff --git a/spacy/tests/parser/test_sbd.py b/spacy/tests/parser/test_sbd.py index fea6b4162..332147177 100644 --- a/spacy/tests/parser/test_sbd.py +++ b/spacy/tests/parser/test_sbd.py @@ -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] +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 # def test_sbd_serialization_nonprojective(DE):