mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-27 17:54:39 +03:00
Parametrize test cases and mark as xfail
This commit is contained in:
parent
e4c84321a5
commit
e6465b9ca3
|
@ -2,12 +2,9 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
def test_issue792(en_tokenizer):
|
@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."""
|
"""Test for Issue #792: Trailing whitespace is removed after parsing."""
|
||||||
text = "This is a string "
|
|
||||||
doc = en_tokenizer(text)
|
doc = en_tokenizer(text)
|
||||||
assert(doc.text_with_ws == 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