Parametrize test cases and mark as xfail

This commit is contained in:
Ines Montani 2017-01-31 15:14:42 +01:00 committed by GitHub
parent e4c84321a5
commit e6465b9ca3

View File

@ -2,12 +2,9 @@
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)
@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)
assert(doc.text_with_ws == text)