mirror of https://github.com/explosion/spaCy.git
Token comparison test
This commit is contained in:
parent
18c3c2d05c
commit
64f747cb65
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue