From 5cc2f2b01ab26e313a7035f998fc1b4373cb6cc5 Mon Sep 17 00:00:00 2001 From: "Yubing (Tom) Dong" Date: Tue, 6 Oct 2015 02:08:39 -0700 Subject: [PATCH] Test simple indexing for Span --- tests/tokens/test_tokens_api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/tokens/test_tokens_api.py b/tests/tokens/test_tokens_api.py index a272a8e3b..34e54a2af 100644 --- a/tests/tokens/test_tokens_api.py +++ b/tests/tokens/test_tokens_api.py @@ -57,6 +57,9 @@ def test_getitem(EN): span = tokens[40:50] assert span.start == span.end == 7 and not to_str(span) + span = tokens[1:4] + assert span[0].orth_ == 'it' + @pytest.mark.models def test_serialize(EN):