mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
Added regression test for Issue #792.
This commit is contained in:
parent
6c665b81df
commit
e4c84321a5
13
spacy/tests/regression/test_issue792.py
Normal file
13
spacy/tests/regression/test_issue792.py
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# coding: utf-8
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
|
def test_issue792(en_tokenizer):
|
||||||
|
"""Test for Issue #792: Trailing whitespace is removed after parsing."""
|
||||||
|
text = "This is a string "
|
||||||
|
doc = en_tokenizer(text)
|
||||||
|
assert(doc.text_with_ws == text)
|
||||||
|
|
||||||
|
text_unicode = "This is a string\u0020"
|
||||||
|
doc_unicode = en_tokenizer(text_unicode)
|
||||||
|
assert(doc_unicode.text_with_ws == text_unicode)
|
Loading…
Reference in New Issue
Block a user