  
  @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
 
</s> remove @pytest.mark.xfail
 </s> add  </s> remove     assert doc.text_with_ws == text
 </s> add     assert ''.join([token.text_with_ws for token in doc]) == text


@pytest.mark.parametrize('text', ["This is a string", "This is a string\n"])
def test_control_issue792(en_tokenizer, text):
    """Test base case for Issue #792: Non-trailing whitespace"""
    doc = en_tokenizer(text)
    assert ''.join([token.text_with_ws for token in doc]) == text </s> remove         i += 1
 </s> add 
    """Test for Issue #792: Trailing whitespace is removed after tokenization."""
  
  @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 tokenization."""
      doc = en_tokenizer(text)
      assert doc.text_with_ws == text
keep keep keep keep replace keep keep
 Fix handling of trailing whitespace

Fix off-by-one error that meant trailing spaces were being dropped.
Closes #792 
spacy/tests/regression/test_issue792.py