From 9bef797afed174ffbec240ec456275a935a9f445 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 6 Jul 2014 20:02:00 +0200 Subject: [PATCH] * Rejigged tests. Working possessives, but no other contractions --- tests/test_post_punct.py | 7 +++---- tests/test_pre_punct.py | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/test_post_punct.py b/tests/test_post_punct.py index af87cf919..0138819db 100644 --- a/tests/test_post_punct.py +++ b/tests/test_post_punct.py @@ -18,11 +18,10 @@ def test_close(close_puncts): for p in close_puncts: string = word_str + p token = lookup(string) - assert unhash(lex_of(token)) == word_str tokens = expand_chunk(token) assert len(tokens) == 2 - assert unhash(lex_of(tokens[0])) == word_str assert unhash(lex_of(tokens[1])) == p + assert unhash(lex_of(tokens[0])) == word_str def test_two_different_close(close_puncts): @@ -43,6 +42,6 @@ def test_three_same_close(close_puncts): for p in close_puncts: string = word_str + p + p + p tokens = expand_chunk(lookup(string)) - assert len(tokens) == 2 + assert len(tokens) == 4 assert unhash(lex_of(tokens[0])) == word_str - assert unhash(lex_of(tokens[1])) == p + p + p + assert unhash(lex_of(tokens[1])) == p diff --git a/tests/test_pre_punct.py b/tests/test_pre_punct.py index a085ea6c9..88da4f595 100644 --- a/tests/test_pre_punct.py +++ b/tests/test_pre_punct.py @@ -43,8 +43,8 @@ def test_three_same_open(open_puncts): for p in open_puncts: string = p + p + p + word_str token = lookup(string) - assert unhash(lex_of(token)) == p + p + p + assert unhash(lex_of(token)) == p tokens = expand_chunk(token) - assert len(tokens) == 2 - assert unhash(lex_of(tokens[0])) == p + p + p - assert unhash(lex_of(tokens[1])) == word_str + assert len(tokens) == 4 + assert unhash(lex_of(tokens[0])) == p + assert unhash(lex_of(tokens[3])) == word_str