Skip to content

Commit

Permalink
Added regression test for Issue explosion#792.
Browse files Browse the repository at this point in the history
  • Loading branch information
latkins committed Jan 31, 2017
1 parent 6c665b8 commit e4c8432
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spacy/tests/regression/test_issue792.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit e4c8432

Please sign in to comment.