diff --git a/tests/test_sbd.py b/tests/test_sbd.py index 6b1e907da..f4c603409 100644 --- a/tests/test_sbd.py +++ b/tests/test_sbd.py @@ -12,32 +12,29 @@ def test_single_period(EN): string = 'A test sentence.' words = EN(string) assert len(words) == 4 - assert list(words.sents) == [(0, 4)] + assert len(list(words.sents)) == 1 + assert sum(len(sent) for sent in words.sents) == len(words) def test_single_no_period(EN): string = 'A test sentence' words = EN(string) assert len(words) == 3 - assert list(words.sents) == [(0, 3)] + assert len(list(words.sents)) == 1 + assert sum(len(sent) for sent in words.sents) == len(words) def test_single_exclamation(EN): string = 'A test sentence!' words = EN(string) assert len(words) == 4 - assert list(words.sents) == [(0, 4)] + assert len(list(words.sents)) == 1 + assert sum(len(sent) for sent in words.sents) == len(words) def test_single_question(EN): string = 'A test sentence?' words = EN(string, tag=False, parse=False) assert len(words) == 4 - assert list(words.sents) == [(0, 4)] - - -def test_(EN): - string = 'A test sentence?' - words = EN(string, tag=False, parse=False) - assert len(words) == 4 - assert list(words.sents) == [(0, 4)] + assert len(list(words.sents)) == 1 + assert sum(len(sent) for sent in words.sents) == len(words)