def test_issue792(en_tokenizer, text):
    """Test for Issue #792: Trailing whitespace is removed after tokenization."""
    doc = en_tokenizer(text)
    assert "".join([token.text_with_ws for token in doc]) == text
Test for Issue #792: Trailing whitespace is removed after tokenization.
spacy/tests/lang/en/test_tokenizer.py