Files

12 lines
405 B
Python
Raw Permalink Normal View History

from services.text_utils import en_answers_match, normalize_en_answer
def test_normalize_en_answer_collapses_whitespace():
assert normalize_en_answer(" A Lot Of ") == "a lot of"
def test_en_answers_match_phrase_with_extra_spaces():
assert en_answers_match("a lot of", "a lot of")
assert en_answers_match("A Lot Of", "a lot of")
assert not en_answers_match("a lot", "a lot of")