diff --git a/spacy/tests/tokens/test_tokens_api.py b/spacy/tests/tokens/test_tokens_api.py index c94ee5de2..c9b57e689 100644 --- a/spacy/tests/tokens/test_tokens_api.py +++ b/spacy/tests/tokens/test_tokens_api.py @@ -12,6 +12,10 @@ import pytest def test_tokens_compare_by_string_position(): vocab = Vocab() doc = Doc(vocab, [u'one', u'two', u'three']) + # Get the tokens in this order, so their ID ordering doesn't match the idx + three = doc[-1] + two = doc[-2] + one = doc[-1] one, two, three = doc assert one < two < three assert not one > two