From b0c6daf356c58e9ed373542ab2de30082a5e2237 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 15 Oct 2015 03:20:51 +1100 Subject: [PATCH] * Fix test_space_attachment --- tests/parser/test_space_attachment.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/parser/test_space_attachment.py b/tests/parser/test_space_attachment.py index 73cf22cea..2a5636b95 100644 --- a/tests/parser/test_space_attachment.py +++ b/tests/parser/test_space_attachment.py @@ -7,6 +7,5 @@ def test_space_attachment(EN): sentence = 'This is a test.\nTo ensure spaces are attached well.' doc = EN(sentence) - for word in doc: - if word.is_space: - assert word.head.i == (word.i - 1) + for sent in doc.sents: + assert not sent[-1].is_space