From 090aed940a8340d20b4ab1cd31637ceae3753cfe Mon Sep 17 00:00:00 2001 From: ines Date: Tue, 24 Oct 2017 15:28:05 +0200 Subject: [PATCH] Add test for currently failing span.as_doc case --- spacy/tests/spans/test_span.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spacy/tests/spans/test_span.py b/spacy/tests/spans/test_span.py index dbb835301..4050809b5 100644 --- a/spacy/tests/spans/test_span.py +++ b/spacy/tests/spans/test_span.py @@ -117,3 +117,9 @@ def test_span_to_array(doc): assert arr[0, 0] == span[0].orth assert arr[0, 1] == len(span[0]) + +@pytest.mark.xfail +def test_span_as_doc(doc): + span = doc[4:10] + span_doc = span.as_doc() + assert span.text == span_doc.text