spaCy/spacy/tests/regression/test_issue792.py

13 lines
355 B
Python
Raw Normal View History

2017-01-31 16:47:42 +03:00
# coding: utf-8
from __future__ import unicode_literals
2017-01-31 17:18:30 +03:00
import pytest
2017-01-31 16:47:42 +03:00
2017-01-31 17:19:33 +03:00
@pytest.mark.xfail
@pytest.mark.parametrize('text', ["This is a string ", "This is a string\u0020"])
def test_issue792(en_tokenizer, text):
"""Test for Issue #792: Trailing whitespace is removed after parsing."""
doc = en_tokenizer(text)
2017-01-31 17:19:33 +03:00
assert doc.text_with_ws == text