Skip to content

Commit

Permalink
Add xfailing test for #3468
Browse files Browse the repository at this point in the history
  • Loading branch information
ines committed Mar 23, 2019
1 parent ed91592 commit 02d9378
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions spacy/tests/regression/test_issue3468.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# coding: utf8
from __future__ import unicode_literals

import pytest
from spacy.lang.en import English
from spacy.tokens import Doc


@pytest.mark.xfail
def test_issue3468():
"""Test that sentence boundaries are serialized if they're not set by the
dependency parser."""
nlp = English()
nlp.add_pipe(nlp.create_pipe("sentencizer"))
doc = nlp("Hello world")
assert doc.is_sentenced
assert doc[0].is_sent_start
assert len(list(doc.sents)) == 1
doc_bytes = doc.to_bytes()
new_doc = Doc(nlp.vocab).from_bytes(doc_bytes)
assert new_doc.is_sentenced
assert doc[0].is_sent_start
assert len(list(new_doc.sents)) == 1

0 comments on commit 02d9378

Please sign in to comment.